• Advertisement
Sign in to follow this  

[web] php/mysql help

This topic is 4471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

<?php $name = "theev2"; $pass = "pass"; $db = "theev2_db"; mysql_connect(localhost,$name,$pass) or die("cant connect"); @mysql_select_db($db) or die( "Unable to select database"); $query = "INSERT INTO contacts VALUES ('',$_POST["url"], $_POST["recomendtoothers"], $_POST["numoffs"], $_POST["signupprocess"]',' $_POST["emailaddressesallowed"], $_POST["beenwithhishost"], $_POST["billingproblems"], $_POST["Pricevalue"], $_POST["Uptime"], $_POST["platform"], $_POST["Transfer"], $_POST["plus"], $_POST["extrafeatures"], $_POST["ExtraFeaturesbuilt"], $_POST["Biggestcomplaint"], $_POST["additionalcomments"])"; mysql_query($query); ?> I get this Parse error: parse error, unexpected '\"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/theev2/public_html/tests/welcome.php on line 33 the bolded line in 33

Share this post


Link to post
Share on other sites
Advertisement
Firstly, you're putting double quotes inside double quotes without escaping them, and/or just using the syntax incorrectly.

Secondly, you're putting stuff into the database in a fashion likely to cause data corruption and/or sql injection exploits.

Mark

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement