Jump to content

joomphp

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by joomphp

  1. suer thing maq, didn't know about that code thing before. Just wanted to thank kenrbnsn , retyping the code has solved the issue, I don't know how you picked that up, but it worked and the non-ascii was the cause. I am new to php, is there a light weight utility that I can use to type code in so in the future this type of error can be avoided. Thanks so much for your help
  2. Please help! this appears to be simple coding, I just can't believe that I am not seeing where the fault in this is.
  3. I am running a simple php mysql_connect but I keep on getting the following error: Connected to MySQL 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 'FROMÂ jos_menu' at line 1 I don't understand what the issue is here, teh syntax seems to be correct but there is something wrong with the mysql_query. Can anyone spot the issue here and please help. This query was running fine before. I have tried this on my godaddy account (linux) and also on my local machine which is using xampp on windows xp. I keep on gettnig the same error. Below is my code please help! <?php $username = "myname"; $password = "pwd"; $hostname = "localhost"; //connection to the database $dbhandle = mysql_connect($hostname, $username, $password) or die ('Error: '.mysql_error ()); echo "Connected to MySQL<br>"; mysql_select_db("dbname", $dbhandle); $result = mysql_query("SELECT * FROM jos_menu") or die ('Error: '.mysql_error ()); while ($row = mysql_fetch_array( $result )) {echo $row['parent_id']; } mysql_close($dbhandle); ?>
×
×
  • 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.