Jump to content

NIPS

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

NIPS's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it should be as the free host supports php and offers phpadmin as a service. it does say that "You should upgrade to PHP 4.1.0 or later" in the php admin section. how do i know what version this php script is?
  2. im using a free host which uses a linex server. any ideas??
  3. hi guys, just trying to display some information from my mysql database and have come across this error message. "You don't have permission to access / on this server." here is my code [code] <html> <head> <title>Magalluf Uncut</title> </head> <body> <?php // open connection to MySQL server $connection = mysql_ connect('localhost', '12725', 'password') ~ or die ('Unable to connect!'); // select database for use mysql_ select_ db('12725') or die ('Unable to select database!'); // create and execute query $query = 'SELECT * FROM Bars'; $result = mysql_ query($ query) ~ or die ('Error in query: $query. ' . mysql_ error()); // check if records were returned if (mysql_ num_ rows($ result) > 0) { // print HTML table echo '<table width= 100% cellpadding= 10 cellspacing= 0 border= 1>'; echo '<tr>< td>< b> ID</ b></ td>< td>< b> Name</ b></ td>< td>< b> Price</ b></ td></ tr>'; // iterate over record set // print each field while($ row = mysql_ fetch_ row($ result)) { echo '<tr>'; echo '<td>' . $row[ 0] . '</td>'; echo '<td>' . $row[ 1] . '</td>'; echo '<td>' . $row[ 2] . '</td>'; echo '</tr>'; } echo '</table>'; } else { // print error message echo 'No rows found!'; } // once processing is complete // free result set mysql_ free_ result($ result); // close connection to MySQL server mysql_ close($ connection); ?> </body> </html> [/code] any help would be great!
×
×
  • 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.