Jump to content

info doesnt get added to my db


primcrew

Recommended Posts

im just trying a simple test to add info to my db

 

--Db info

 

$HOST="----";
$USER="----";
$PASSWORD="----";
$DB="----";

$db_connect=" mysql_connect($HOST, $USER, $PASSWORD)";
$select_db="mysql_select_db($DB, $db_connect)";
if ($db_connect){print("Connected<br>");}
else {print("error");}
if ($select_db){print("Db-Connected<br>");}
else {print("error");}
---
php page info---

if ($_GET['new_customer_submit']){print("Form Submitted<br>");
								$result="INSERT INTO 'test' ('cust_id','last_name')																

VALUES
(' ' , '$_GET[new_customer_lastname]'																	
																)";
								$result_ex = mysql_query($result);
								if ($result_ex){print("New Customer Added<br>");}
								else {print("Add Customer Error!<br>");}

							  }
else {print("New Form");}

it says it connects fine and i see the results in the get link but it wont add to db

 

Link to comment
https://forums.phpfreaks.com/topic/225748-info-doesnt-get-added-to-my-db/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.