Jump to content

Code Not Posting


bev

Recommended Posts

The code below is suppose to post the information from the filled form to a form inside an admin panel..However it now does not post or show anyone registered at all from the page this code is on.. It did work . Some minor changes were made ( from here $variable = $_POST['variable']; to here $result= mysql_query($sql); was added) now it will not post in the admin.. Does anyone see what would cause this?

 

 

 

if($_POST[btnSubmit]=="Submit")

{

$checkusernmae=mysql_num_rows(mysql_query("select * from user_registration where email='$_POST' and contact_name='$_POST[contact]'"));

if($checkusernmae == 0)

{

$insert="insert into user_registration(company_name,contact_name,address,city,state,country,zipcode,phone,email,pword,package,created_date,cctype,ccnumber,ccmonth,ccyear,ccv,fname,lname,comment) value('$_POST[company]','$_POST[contact]','$_POST[address]','$_POST[city]','$_POST[state]','$_POST[country]','$_POST[zipcode]','$_POST[phone]','$_POST','$_POST[passwrd]','$_POST[group1]',now(),'$_POST[cctype]','$_POST[ccnumber]','$_POST[Month]','$_POST[Year]','$_POST[ccv]','$_POST[fname]','$_POST[lname]','$_POST[comment]')','";

//echo $insert;exit;

mysql_query($insert);

 

$variable = $_POST['variable'];

$sql="insert into orders(sitemembership,clientmembership,sellitemsmembership,auctionitemsmembership,shoppingcrt3months,shoppingcart6months,shoppingcrt1year)

value('[sitemembership]','$_POST[clientmembership]','$_POST[sellitemsmembership]','$_POST[auctionitemsmembership]','$_POST[shoppingcrt3months]',

'$_POST[shoppingcrt6months]','$_POST[shoppingcrt1year]','$_POST[companyname]')','";

$result= mysql_query($sql);

 

Link to comment
https://forums.phpfreaks.com/topic/129492-code-not-posting/
Share on other sites

Yeah MadTechie I forgot to add the code there.. I pasted it in though so you can see it now.. I just corrected what AndyB found wrong and then retried but I get the same thing

 

 

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '','' at line 3

 

Link to comment
https://forums.phpfreaks.com/topic/129492-code-not-posting/#findComment-671361
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.