Jump to content
  • Advertisement
Sign in to follow this  
game mercenary

[web] php/mysql help

This topic is 4653 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!