PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have created the following two queries the first one works fine however the second (insert query) )doesn't. No error message is supplied the data just doesn't enter the table. Any advice would be great thanks.
$query="UPDATE cu SET curr ='".$HTTP_SESSION_VARS['curr]."' WHERE Id = '".$HTTP_SESSION_VARS['Id']."'";
mysql_query($query, $link_id);
$query2="INSERT INTO acc VALUES('','$tha', '$dep', '$HTTP_SESSION_VARS[Id]')";
mysql_query($query2, $link_id);
For Query2, you may want to check to see if the first column you're inserting into is required (ie cannot be null).
Otherwise, you could reframe the query like this:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
You don't have to put the autonumber field in the query
I've always found it better to do:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]