Advertising
Paste Description for p_bclr
mysql_insert_id()
feel free to point out everything not done properly
- p_bclr
- Tuesday, March 4th, 2008 at 5:10:46am MST
- if ($_POST["accao"]==1)
- {
- $sqlAttach="INSERT INTO attachments (attach_name, attach_file) VALUES ('".$_POST['name_attach']."','$filename1')";
- mysql_query($sqlAttach);
- //$id_attach=mysql_insert_id();
- $id_attach=mysql_query("SELECT LAST_INSERT_ID() FROM attachments;");
- $sqlPais="INSERT INTO cities (city_name,city_countrycode) VALUES ('".$_POST['localidade']."','".$_POST['pais']."')";
- mysql_query($sqlPais);
- //$id_city=mysql_insert_id();
- //$id_city=mysql_query("SELECT MAX(city_id) FROM cities;");
- $sqlEvent="INSERT INTO events (event_agent_id, event_city_id, event_data, event_time, event_date_in, event_date, event_attach_id) VALUES ('".$_SESSION['id']."', LAST_INSERT_ID(), '".$_POST['evento']."', '".$_POST['hora']."', '".$datainsercao."', '".$_POST['dia']."', '".$id_attach."')";
- mysql_query($sqlEvent);
- echo"<script language='JavaScript'>";
- echo"alert('evento inserido, boa!');";
- echo"window.location.href='../';";;
- echo"</script>";
- }
Paste Details
Tags: php p_bclr phoenixsleep
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.