I'm having an issue with MySql insert statement. I have a page called test.php, created to check my insert statement. Here is the code on it.
$fullname="Elliot Springer";
$dbh=mysql_connect($host,$un,$pw);
mysql_select_db($dbname, $dbh);
$sql = "INSERT INTO members (name) VALUES ('$fullname')";
mysql_query($sql);
mysql_close($dbh);
Now, when i access this page (test.php) from any other page, the insert statement doesn't insert into the database, if I refresh the page (test.php), then it executes and the insert statement works. The only other thing on the page is the connection variables which are correct, hense the execution second time around.
Does anyone know why this would not execute when coming from another page, but does on the refresh?
Please help.
Thanks
Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
International SEM | Social Media | Search Friendly Design | SEO | Paid Search / PPC | Seminars | Forum Threads | Q&A | Copywriting | Keyword Research | Web Analytics / Conversions | Blogging | Dynamic Sites | Linking | SEO Services | Site Architecture | Search Engine Spam | Wrap-ups | Business Issues | HRA Questions | Online Courses
My Sql Insert Statement
Started by
heyman
, Dec 23 2004 06:33 PM
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users








