Jump to content

Lee-Bartlett

Members
  • Posts

    225
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Lee-Bartlett's Achievements

Member

Member (2/5)

0

Reputation

  1. its working, dont worry im an idiot. missed somthing i shouldnt.
  2. Yer but i tried before the dot, after the dot, in middle and at the end all give. unexpected } on line number
  3. <?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
  4. u know u get the dollar end, i assumed it was the } cause u never closed the else.
  5. cant figure out where to end it, $end, but i put the } in like all places.
  6. im using the code u gave me. error is Notice: Undefined variable: row in /home/nexodom/public_html/website/admin/email.php on line 12 <?php error_reporting(E_ALL) ; ini_set('display_errors','1'); ?> <?php require_once "includes/db_connection.php"; $sql = "SELECT email FROM email"; if ($result = mysql_query($sql)) { if (mysql_num_rows($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"; } ?>
  7. In phpmyadmin, it has, table name email, 2 feilds email and id, in them 2, there is 1 for id and my email adress. and it is connecting to my db.
  8. <form action='' method='post'> <input type='text' name='id' value=''> <input type='submit' value='update' name='updatebutton'> </form>
  9. all it shows is the form, all the rest is in php and cant be seen.
  10. What page source when you right click the page or the whole code.
  11. nope, all i am getting back is a blank echo. and the feild isnt being echoed.
  12. Took out that and it still wont echo the email adress i put in there
×
×
  • 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.