Here is how to do a confirm box just in case you forget it
<span> <a href="delete.php" <strong>OnClick</strong> OnClick="return confirm(\'Are you sure you want to delete?\');"> delete everything </a> </span>
Here is how to do a confirm box just in case you forget it
<span> <a href="delete.php" <strong>OnClick</strong> OnClick="return confirm(\'Are you sure you want to delete?\');"> delete everything </a> </span>
Getting the last inserted ID in PHP(Mysql) is not too bad.
I am assuming that you already have a connection to the database;
echo mysql_insert_id();
or
$result = mysql_query ('SELECT LAST_INSERT_ID()'); $row = mysql_fetch_array($result); echo $row[0];
Here step my step how to solve the issue
Verify the status of your get_magic_quotes_gpc directive
if (get_magic_quotes_gpc()) echo 'Magic Quotes is enabled'; else echo 'Magic Quotes is disabled'; or check your php.ini via echo phpinfo();
If your magic quotes is ON you will need to use the stripslashes function before you use the mysql_real_escape_string function. Remember both Magic quotes and mysql_real_escape_string add slashes so you do not want to that twice. Some people would say just turn magic quotes off in php.ini, well i prefer not going to my php.ini if i do not have to.
mysql_real_escape_string(stripslashes($_POST['firstname']));
If your magic quote is off you just have to use stripslashes once when you retrieve the data.
PHP extensions are either compiled into PHP or simply loaded as Shared modules.
Compiled into PHP example
./configure --with-mysql
or
Shared Module example
php_mysql.dll http://php.net/manual/en/install.windows.extensions.php php_mysql.so
or you can use yum or apt-get depending on your platform to install the shared modules.
You try to run :
pear install Structures_Graph
and you are greeted with ERROR: unable to unpack
C:\Program Files\Zend\ZendServer\bin\PEAR\tmp\Structures_Graph-1.0.4.tgz
Let’s go and see how we can fix this. This pear software is buggy on Windows it is not even funny. I am wondering how dedicated they are when it comes to Windows but that is a different story.
First let’s make sure that you run the “cmd” tool as an administrator (It may not be a requirement if you are an administrator but you never know)
Right click on the command line tool and click on administrator
Now lets run the following commands
pear upgrade-all pear update-channels pear clear-cache
Try to run the command again:
pear install Structures_Graph
If does not work we are going to install the structure graph manually
Dowload the Structures_Graph from this website http://pear.php.net/package/Structures_Graph/download/
and extract it to your PEAR folder.
FYI: Just do a “pear list” to see what packages are installed then find their location and unpack the structure_graph to the same location.
Now try Execute Step 2 and Step 3
This should work if not drop me a comment below.