Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6606053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:21:18+00:00 2026-05-25T19:21:18+00:00

This is the error i am receiving and this is my code. I am

  • 0

This is the error i am receiving and this is my code. I am not sure what the error is since line one is only my

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 1.

Code:

<?php
$hostname ="localhost";
$db_user = "root";
$db_password = "";
$database = "Special_order_form";
$db_table = "FORMS";
$db = mysql_connect ($hostname, $db_user, $db_password);
mysql_select_db($database,$db);
?>
<html>

<h1><b><center>SPECIAL ORDER/BACK ORDER FORM</center></b></h1>
<body>
<?php 
if (isset($_REQUEST['Submit'])) { 
 $sql = "INSERT INTO $db_table
             (MANUFACTURER, WAREHOUSE, ORDERTYPE, SOLDTO, SHIPFROM, STOREFROM, SHIPMETH, PO, DAY, ACCNT#, CUSTPO, SHIPPINGADDY, SHIPCUSTVIA, SHIPPINGINSTR, FOB, CASHSALE) 
         values('" . mysql_real_escape_string(stripslashes($_REQUEST['MANUFACTURER'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['WAREHOUSE'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['ORDERTYPE'])) .  "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['SOLDTO'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['SHIPFROM'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['STOREFROM'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['SHIPMETH'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['PO'])) . "','" . 
            mysql_real_escape_string(stripslashes($_REQUEST['DAY'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['ACCNT#'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['CUSTPO'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['SHIPPINGADDY'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['SHIPCUSTVIA'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['SHIPPINGINSTR'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['FOB'])) . "','" , 
            mysql_real_escape_string(stripslashes($_REQUEST['CASHSALE'])) . "')";
if($result = mysql_query($sql ,$db)) { 
echo '<h1>Thank you</h1>Your information has been entered into our database<br><img    src=""'; 
} else 
{ 
echo "ERROR: ".mysql_error(); 
}
} else 
{
?>

<center>
<table border="1">

      <th>MANUFACTURER <br />
   <form method="post" action="">
     <textarea name="MANUFACTURER" cols="20" rows="3" required>
     </textarea><br>
     </th>
    <th>WAREHOUSE #
   <select option="" name="WAREHOUSE"required> 
   <option value="none" selected="selected"></option>
   <option value="1">1</option>
   <option value="2">2</option>
   <option value="3">3</option>
   <option value="4">4</option>
   <option value="5">5</option>
    <option value="6">6</option>
   <option value="7">7</option>
   <option value="8">8</option>
   </select>
    </th>
    <th>


   <form action ="">
   <select option="" name="ORDERTYPE"required>
  <option value="none" selected="selected">Select an option</option>
 <option value="Back Order">Back Order</option>
  <option value="Special Order">Special Order</option>
  <option value="Stock Request">Stock Request</option>
  </select>
 </th>


 <th>
 </th>


 <tr>
 </tr>
 <th>SOLD TO</th>
 <th>SHIP FROM FACTORY DIRECT TO:</th>
 <th>ORDER VIA:</th>
 <th>DO NOT WRITE IN THIS BOX <br /> PURCHASING USE ONLY</th>
  <tr>
 <td><form method="post" action="" required>
 <textarea name="SOLDTO" cols="20" rows="9" required>
 </textarea><br>
</td>
<td>
<center>
  <input type="radio" name="SHIPFROM" value="VIKING WAREHOUSE" required> VIKING WAREHOUSE
 <br>
 <input type="radio" name="SHIPFROM" value="AIH STORE"> AIH STORE #<form action ="" required>
  <select option="" name="FROMSTORE">
   <option value="0" selected="selected"></option>
     <option value="1">1</option>
 <option value="2">2</option>
 <option value="3">3</option>
  <option value="4">4</option>
  <option value="5">5</option>
 <option value="6">6</option>
 <option value="7">7</option>
 <option value="8">8</option>
 </select required>
 <br />
 <input type="radio" name="SHIPFROM" value="CUSTOMER (DROP SHIP)" required> CUSTOMER (DROP SHIP)
 </center>
 </td>
 <td><SELECT MULTIPLE SIZE=10 name="SHIPMETH"required>
  <OPTION VALUE="o1">Next Stock Order
 <OPTION VALUE="o2">TR Trucking
 <OPTION VALUE="o3">Fed Ex- One Day
 <OPTION VALUE="o4">Fed Ex- Second Day
 <OPTION VALUE="o5">Fed Ex- Ground
 <OPTION VALUE="o6">DHL
 <OPTION VALUE="o7">UPS Red(Overnight)
  <OPTION VALUE="o8">UPS Blue(2-Day)
 <OPTION VALUE="o9">UPS Ground
 <OPTION VALUE="o10">Other
 </SELECT></td>


 <td><center>  P.O.    
 <input type="text" name="PO">
 <br>
 DATE: 
 <input type="text" name="DAY">
 </center></td>
 </td>
 <tr>
 <td>ACCOUNT #<br />
  <form method="post" action="">
  </textarea><br><input type="text" name="ACCNT#" required>
  <br/>Customer Purchase<br/> Order # 
 <br/><input type="text" name="CUSTPO">
 </td>
 <td>SHIPPING ADDRESS: <br/>
 <form method="post" action="">
 <textarea name="SHIPPINGADDY" cols="40" rows="5">
  </textarea><br>SHIP TO CUST FROM<br/> AIH VIA 
  <input type="text" name="SHIPCUSTVIA" required>
  </td>
 <td>Special Shipping Instructions<br/><form method="post" action="">
 <textarea name="SHIPPINGINSTR" cols="20" rows="5">
 </textarea><br> 
 </td>
 <td><center>Sell FOB Point<form action="">
 <select name="FOB" required>
 <option value="none" selected="selected">Make A selection</option>
 <option value="Anchorage">Anchorage</option>
 <option value="Factory">Factory</option>
 <option value="Seattle">Seattle</option>
  <option value="Other">Other</option>
 </select>
 </center></td>
 <tr>
 <td>
 CASH SALE
 <input type="checkbox" name="CASHSALE" value="CASH SALE" /><br/>
 COLLECT 50% DEPOSIT
<td></td>
<td></td>
<td>MINIMUM SPECIAL ORDER $50.00
<br/>(Note:  EXCEPT WITH STOCK ORDER<br/> STANDARD PACK QUANTITY<br/> MUST APPLY ON ALL ORDERS)</td>
</table>
 <input type="submit" name="Submit" value="Submit"></center>
 <?php
 }
 ?>
 </form>
 </form>
 </body> 
 </html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:21:19+00:00Added an answer on May 25, 2026 at 7:21 pm

    Try putting ACCNT# in backticks like this `ACCNT#`. For good practice you should enclose your table names and column names in your queries.

    You can also echo your $sql variable and inspect the query if you are having problems. Sometimes that can help show the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure what the problem is but I keep receiving this error
I am receiving this error. I have no clue as to why it would
In the following code, I am receiving the said error, and am not exactly
I'm receiving this error in my Linq statement --- Cannot implicitly convert type 'System.Collections.Generic.IEnumerable'
I am currently receiving this error: Validation of viewstate MAC failed. If this application
I'm receiving suddenly this error on a Win2003 Server Web Application: Microsoft VBScript runtime
I'm having trouble overriding a ModelForm save method. This is the error I'm receiving:
This error seems to just pop up now and again. It is not restricted
I am receiving this error >GXRenderManager.obj : error LNK2001: unresolved external symbol private: static
I'm trying to mock MouseButtonEventArgs.GetPosition() with Moq, but I keep receiving this error: System.ArgumentException:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.