MYSQL INSERT ID NOT WORKING


Posted on 16th Feb 2014 07:03 pm by admin

Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blank nothing?

Did you know?Explore Trending and Topic pages for more stories like this.

Code: mysql_query("INSERT INTO `prays` (`title`,`prayer`,`time`,`level`,`nameid`,`name`) VALUES (
'". mysql_real_escape_string($_POST['title']) ."',
'". mysql_real_escape_string($text) ."',
'". mysql_real_escape_string($time) ."',
'". mysql_real_escape_string($_POST['level']) ."',
'". mysql_real_escape_string($e) ."',
'". mysql_real_escape_string($name) ."');") or die(mysql_error()) ;
mysql_close();
$id = mysql_insert_id();
header("Location: ./?view=$id");
No comments posted yet

Your Answer:

Login to answer
83 Like 9 Dislike
Previous forums Next forums
Other forums

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

socket makes browser hang...
I have a socket server, and I am having a problem at the moment...

A browser sends a http hea

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

Open browser page depending on XML results
Hello,

I have some PHP code that sends webbased from data to an external url ( in the form of

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

help removing unwanted graphic
How do I remove the small elongated rectangular shape between the "Latest post" and "

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash