Jump to content

Emma316

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Emma316's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thats alot of work you have ahead of you trust me I'm trying to do something very similar.. all I can say is listen to what the people here tell you and dont give up searching the internet.  Google is (y)our friend.
  2. @localhost Yes it worked just fine, thanks alot ^^ @wildteen88 Thanks, if people actually told me [i]how it actually works and why[/i], I wouldn't have so many problems.. once a person understands the principle (spelling) then correcting typos and things is a breeze.  By the way, this is my 5th php script to make ever what do you all think? @People writing tutorials and faqs -- please remember what I said to wildteen88.
  3. So field names have to be in quotes?  Ok thanks :)
  4. This is the error: [quote] 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 ''querys' (queryid, from, subject, body) VALUES ('596581134692432766302226', 'ema' at line 1[/quote] This is the source: [code] <html> <head> <title>Support - Create Query</title></head> <body> <?PHP $mailto = 'admin@site.net'; $instance = $_POST['instance']; $subject = $_POST['subject']; $from = $_POST['from']; $body = $_POST['body']; $primary = 'root'; $key = ''; $location = 'support'; if(!$instance) { ?> <form action="makemail.php" method="post"> Subject: <input type="text" name="subject"/><br /> *E-mail: <input type="text" name="from"/><br /> *Message:<br /> <textarea name="body" cols="55" rows="25"></textarea><br /> <input type="hidden" name="instance" value="1" /> <input type="submit" name="send" /> </form> <? } else { if (!$from){ die('Required field left blank. <meta http-equiv="refresh" content="2;">Redirecting, please wait...'); } elseif (!$body){ die('Required field left blank. <meta http-equiv="refresh" content="2;">Redirecting, please wait...'); } $x = 0; while ($x <= 23) { $queryid=$queryid . rand(0,9); $x++; } $check = $queryid; mysql_connect(localhost,$primary,$key); @mysql_select_db($location) or die(mysql_error()); $query = "INSERT INTO 'querys' (queryid, from, subject, body) VALUES ('$queryid', '$from', '$subject', '$body')"; mysql_query($query) or die(mysql_error()); mysql_close(); //Close print ('An e-mail has been sent to you with information regarding your support query.  Please check your inbox.'); print ('<meta http-equiv="refresh" content="5;"><br>Redirecting, please wait...'); } ?>[/code] This is a support query form script which is still under construction, but I wont be able to move onto the next part (e-mail sending stuff) until I get past the error code.. a couple things (aka sql user/pass and e-mail changed) but other than that its all the same.  If you know why I'm getting the error, please help me to fix it.
×
×
  • 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.