Danny92 Skrevet 26. juli 2007 Del Skrevet 26. juli 2007 (endret) Hei, har et problem med et script. Det kommer opp: Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\design 1\side_13.php on line 26 Her er scriptet: <? ob_start(); include("config.php"); if($logged[username] && $logged[level] ==5) { //checks to see if the user is logged in, and if their user level //is 5 (this is administrator) if($_GET[user]) { //checks to see if there is a ?user=username variable in the url. if (!$_POST[update]) { // the form hasn't been submitted. We continue... $user = mysql_query("SELECT * from users where username = '$_GET[user]'"); $user = mysql_fetch_array($user); //these lines get the user's information and put it in an array. //we will display the information in the html form echo(" <div align=\"center\"><form method=\"POST\"> <table width=\"100%\"> <tr> <td align=\"right\" width=\"25%\"> User Level </td> <td align=\"left\"> <input type=\"tex\t" size=\"25\" maxlength=\"25\" name=\"level\" value=\"$user[level]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Location </td> <td align=\"left\"> <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\" value=\"$user[location]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> MSN Messenger </td> <td align=\"left\"> <input size=\"25\" name=\"msn\" value=\"$user[msn]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> AOL Messenger</td> <td align=\"left\"> <input size=\"25\" name=\"aim\" value=\"$user[aim]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Email Address</td> <td align=\"left\"> <input size=\"25\" name=\"email\" value=\"$user[email]\"></td> </tr> <tr> <td align=\"center\"> </td> <td align=\"left\"> <input type=\"submit\" name=\"update\" value=\"Update\"></td> </tr> </table> </form> </div>"); //displays the html form } else { $email = htmlspecialchars($_POST[email]); $aim = htmlspecialchars($_POST[aim]); $msn = htmlspecialchars($_POST[msn]); $locate = htmlspecialchars($_POST[locate]); $level = htmlspecialchars($_POST[level]); // the above lines get rid of all html. echo ("$_GET[user]'s profile has been updated."); $update = mysql_query("Update users set email = '$email', msn = '$msn', aim = '$aim', location = '$locate', level = '$level' where username = '$_GET[user]'"); // updates the information in the database. } } else { $getusers = mysql_query("Select * from users order by username asc"); while($users = mysql_fetch_array($getusers)) { //makes a list of all the users echo("<a href=\"admin.php?user=$users[username]\">$users[username]</a><br />"); //displays the user's names } } } else { //the user's level is not 5! They cannot view this page echo("Sorry, but you are not allowed to view this page!"); } ?> EDIT: Fant det ut Det var vist på linje 26 der Endret 26. juli 2007 av dannyboy_1992_ Lenke til kommentar
Crowly Skrevet 26. juli 2007 Del Skrevet 26. juli 2007 Marker gjerne posten med [LØST] i emne feltet. Regner med at det var dette som var galt: <input type=\"tex\t" som skulle vært <input type=\"text\" Lenke til kommentar
Anbefalte innlegg
Opprett en konto eller logg inn for å kommentere
Du må være et medlem for å kunne skrive en kommentar
Opprett konto
Det er enkelt å melde seg inn for å starte en ny konto!
Start en kontoLogg inn
Har du allerede en konto? Logg inn her.
Logg inn nå