Jump to content

[SOLVED] Basic...where am i going wrong.


Lee-Bartlett

Recommended Posts

<?php

require_once "includes/db_connection.php";

$sql = "SELECT email  FROM email";

if ($result = mysql_query($sql)) {
  if (mysql_num_rows($result)) {
    $row = mysql_fetch_assoc($result);
    echo "<form action='' method='post'>\n";
    echo "<input type='text' name='id' value='" . $row['email'] . "'>\n";
    echo "  <input type='submit' value='update' name='updatebutton'>\n";
    echo "</form>\n";
  } else {
    echo "No email found";
  }
} else {
  echo mysql_error() . "<br />$sql";

 

I know it means somthing aint closed, but i cant se where, i tried closing the else at the end and didnt work.

 

 

Parse error: syntax error, unexpected $end in /home/nexodom/public_html/website/admin/email.php on line 21

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.