Parse error: syntax error, unexpected '}' in /home/poopsey/public_html/xxxxxxxxxxxx/admin/index.php on line 34 ?> Welcome back, <b><? echo $admin_id; ?></b>. Logging you in... <script language="Javascript">location.href='<? echo $_SERVER[PHP_SELF]; ?>';</script> <?php Whats wrong....Hmmmmmmm
post a bigger chunk of code - no one will be able to help you otherwise... you need to help other people to help you...
ok, heres more script for ya......who ever solves this error....I would be more then happy to drink a fifth of canadian mist with them..... require_once( "../inc/header.inc.php" ); require_once( "{$dir['inc']}db.inc.php" ); require_once( "{$dir['inc']}admin.inc.php" ); require_once( "{$dir['inc']}profiles.inc.php" ); require_once( "{$dir['inc']}design.inc.php" ); require_once( "{$dir['inc']}admin_design.inc.php" ); require_once( "{$dir['inc']}utils.inc.php" ); if ( $_POST['ID'] ) { $admin_id = process_db_input( $_POST['ID'] ); $admin_pass = process_db_input( $_POST['Password'] ); $result = db_res( "SELECT * FROM `Admins` WHERE `Name` = '$admin_id' AND `Password` = '$admin_pass'" ); if ( mysql_num_rows( $result ) != 1 ) login_form( '<center><b><font color="#ff0000">Login Failed! Try again</font></b></center>', 1 ); } else { setcookie ("adminID", $_POST[ID], 0, "/");setcookie ("adminPassword", crypt( $_POST[Password], 'secret_string' ), 0, "/"); ?> Welcome back, <b><? echo $admin_id; ?></b>. Logging you in... <script language="Javascript">location.href='<? echo $_SERVER[PHP_SELF]; ?>';</script> <?php exit; }
Try this..... <? require_once( "../inc/header.inc.php" ); require_once( "{$dir['inc']}db.inc.php" ); require_once( "{$dir['inc']}admin.inc.php" ); require_once( "{$dir['inc']}profiles.inc.php" ); require_once( "{$dir['inc']}design.inc.php" ); require_once( "{$dir['inc']}admin_design.inc.php" ); require_once( "{$dir['inc']}utils.inc.php" ); if ( $_POST['ID'] ) { $admin_id = process_db_input( $_POST['ID'] ); $admin_pass = process_db_input( $_POST['Password'] ); $result = db_res( "SELECT * FROM `Admins` WHERE `Name` = '$admin_id' AND `Password` = '$admin_pass'" ); if ( mysql_num_rows( $result ) != 1 ) { login_form( '<center><b><font color="#ff0000">Login Failed! Try again</font></b></center>', 1 ); } else { setcookie ("adminID", $_POST[ID], 0, "/");setcookie ("adminPassword", crypt( $_POST[Password], 'secret_string' ), 0, "/"); ?> Welcome back, <b><? echo $admin_id; ?></b>. Logging you in... <script language="Javascript">location.href='<? echo $_SERVER[PHP_SELF]; ?>';</script> <?php exit; } } ?> PHP:
For future reference, PHP error page numbers are more of an "approximation" you could say. A lot of times it'll say "error on line 138", but what it really was is an error on a PHP line above it, or sometimes in the chunk above it. Generally it's a forgotten semicolon, a missing parenthese or something along those lines. Also try use <?php echo 'blah'; ?>, short tags are not always enabled and they are harder on the engine.
I used, infernaliuns....adjustments........and now i get this.... Parse error: syntax error, unexpected '<' in /home/poopsey/public_html/xxxxxxxxxxxxxxx/admin/index.php on line 10 and that line is the first line of this posted php code.....what the heck..... <? require_once( "../inc/header.inc.php" );require_once( "{$dir['inc']}db.inc.
hey i pasted this in and now i get.. Parse error: syntax error, unexpected '<' in /home/poopsey/public_html/aeDating-v4.1/admin/index.php on line 10 line 10 is the beginning of this php code....<?
require_once( "../inc/header.inc.php" ); require_once( "{$dir[inc]}db.inc.php" ); require_once( "{$dir[inc]}admin.inc.php" ); require_once( "{$dir[inc]}profiles.inc.php" ); require_once( "{$dir[inc]}design.inc.php" ); require_once( "{$dir[inc]}admin_design.inc.php" ); require_once( "{$dir[inc]}utils.inc.php" ); if ( $_POST['ID'] ){ $admin_id = process_db_input( $_POST['ID'] ); $admin_pass = process_db_input( $_POST['Password'] ); $result = db_res( "SELECT * FROM `Admins` WHERE `Name` = '$admin_id' AND `Password` = '$admin_pass'" ); if ( mysql_num_rows( $result ) != 1 ){ login_form( '<center><b><font color="#ff0000">Login Failed! Try again</font></b></center>', 1 ); } else { setcookie ("adminID", $_POST[ID], 0, "/"); setcookie ("adminPassword", crypt( $_POST[Password], 'secret_string' ), 0, "/"); ?> Welcome back, <b><? echo $admin_id; ?></b>. Logging you in... <script language="Javascript">location.href='<? echo $_SERVER[PHP_SELF]; ?>';</script> <?php exit(); } } PHP: Peace,
Success....After a halve a quart of Canadian Whiskey and a high end PHP debugger....One bracket was in the wrong place.....Woo Hooo