Recieve this error code parse error, unexpected T_STRING in listDB.php on line 46 what is wrong?
-
Here is the code can anyone tell me what I am doing wrong $state = $_Get['state']; if(empty($state)) exit("<p> You must enter a two didgit abbreviation for the state you wish to see. Hit your browser back button to return to previous page.</p>"); // connecting to the database $connection = @mysqli_connect("localhost","user1"," password1") Or die ("<p>Unable to connect to the Telephone Directory.</p>" . "<p>Error code ".mysqli_connect_errno() .":".mysqli_connect_error()) . "</p>"; $DBName="thompsonm"; @mysqli_select_db($connection,$DBName) or die("<p> Unable to perform search please try again.</p>" ."<p>Error code" . mysqli_errno($connection) . ":". mysqli_error($connection))."<p>; // Table $TableName="contacts information"; $SQLstring = "SELECT First Name, Last Name, State, Area code, Phone number FROM $TableName WHERE State='$state' ODER BY Last Name"; $Qresults = @mysqli_query($connection,$SQLstring) or die ("<p> Unable to perform search please try again.</p>" . "<p>Error code" . mysqli_errno($connection) . ":" . mysqli_error($connection)). "</p>"; if (mysqli_num_rows($Qresults) ==0) die ("There are no listings for that state.</p>"); echo "<table width= '100%' border= '1'>"; echo "<tr><th>Last Name</th><th> First Name</th> <th> State</th><th>Area code</th><th>Phone number</th></tr>"; $Row = mysqli_fetch_assoc($Qresults); do{ echo "<tr><td>{$Row['Last Name']}</td>"; echo "<td>{$Row['First Name']}</td>"; echo "<td>{$Row['State']}</td>"; echo "<td>{$Row['Area code']}</td></tr>; $Row = mysqli_fetch_assoc($Qresult); }while ($Row);
-
Answer:
The ORDER by clause is incorrect SELECT First Name, Last Name, State, Area code, Phone number FROM $TableName WHERE State='$state' ODER BY Last Name it should be "ORDER BY" not "ODER BY"
marcey t at Yahoo! Answers Visit the source
Related Q & A:
- What's wrong with this PHP Twitter API POST?Best solution by Stack Overflow
- What is error code 6 for Yahoo! mail?Best solution by in.answers.yahoo.com
- What does the error code 999 mean?Best solution by Yahoo! Answers
- What is server error code 40402?Best solution by Yahoo! Answers
- Can't delete name off messenger address list, error code 40402,need help pls?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.