Im making an online notepad for my VIP users
i have got this code i have made so far but i keep getting this error
Parse error: syntax error, unexpected T_VARIABLE, expecting T_CASE or T_DEFAULT or '}' in notepad.php on line 17
This is the code i have made:
Cheers if you can help
i have got this code i have made so far but i keep getting this error
Parse error: syntax error, unexpected T_VARIABLE, expecting T_CASE or T_DEFAULT or '}' in notepad.php on line 17
This is the code i have made:
| Code: |
| <?
// Connects to the config include("config.php"); if ($logged[username] && $logged[level] ==2) { echo(""); } else { die("You must be VIP to view this page!"); } switch($_GET['action']) { $check = mysql_query("SELECT COUNT(id) AS totaal FROM notepad WHERE username = '".$logged['username']."'") or die(mysql_error()); if(mysql_result($check, 0, "totaal") == 0) { $insert = mysql_query("INSERT INTO notepad (`username`) VALUES ('".$logged['username']."')") or die(mysql_error()); echo "You notepad account is now created!"; echo "<br><br>"; echo "<a href=\"notepad.php\"><font color=\"#000000\">Click here to continue.</font></a>"; } else{ $notepad = mysql_query("SELECT * from notepad where username = '$logged[username]'"); $notepad = mysql_fetch_array($notepad); echo "<style type=\"text/css\"> <!-- .style1 {color: #000000} --> </style> <table width=\"630\" border=\"3\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"622\">$logged[username] Notepad</td> </tr> <tr> <td height=\"407\"><textarea name=\"textarea\" rows=\"26\" cols=\"101\" type=\"text\" name=\"notepad\">$notepad[notepad]</textarea></td> </tr> <tr> <td height=\"27\"><center> <a href=\"notepad.php?action=update\" class=\"style1\">UPDATE</a> </center></td> </tr> </table> } case "update": $notepad = $_POST[notepad]; $update = mysql_query("Update users set notepad = '$notepad' where username = '$logged[username]'"); echo "Notepad Updated!"; echo "<a href=\"notepad.php\">Back</a>"; break; } ?> |
Cheers if you can help
