Jump to content

cw2395

New Members
  • Posts

    2
  • Joined

  • Last visited

cw2395's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Its saying DatabaseTable 'cw2395.contacts' doesn't exist Im suppose to br creating basically a contact index that stores in a Database name, location, phone etc. I know I should be using mysqli, but this is the last assignment for the class and he has been using this the whole time
  2. I keep getting this error Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in on line 21 <html> <body> <h1> Database </h1> <?php mysql_connect('localhost', 'cw2395', 'tNlkcI6k') or die(mysql_error()); mysql_select_db('cw2395') or die (mysql_error()); $reference = mysql_query("SELECT * FROM contacts"); ?> <table border = "3" cellspacing = "3" cellpadding = "3"> <tr> <th> First Name </th> <th> Last Name </th> <th> Address </th> <th> State </th> <th> Zip </th> <th> Telephone </th> <th> Email </th> </tr> <?php while($row = mysql_fetch_array($reference)) { THIS IS LINE 21 $cell1 = $row['Fname']; //Contacts first name $cell2 = $row['Lname']; //Contacts last name $cell3 = $row['Address']; //Contacts address $cell4 = $row['State']; //Contacts state of residence $cell5 = $row['Zip']; //Contacts zip code of residence $cell6 = $row['Phone']; //Contacts phone number $cell7 = $row['Email']; //Contacts email address ?> help would be very appreciated
×
×
  • 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.