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
Share on other sites

Now this appears AFTER I click the submit button and is still not posting to the admin section ???

 

This is the error

 

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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.