Jump to content

Stumped. Please help!


carylson

Recommended Posts

Returns the following error:

Parse error: syntax error, unexpected '[', expecting ',' or ';' in /hsphere/local/home/dtsabai/parrecsol.com/cp/index.php on line 47

 

The Code:

<?php

include("top.php");

 

if ($_SESSION['LoggedIn'] != True) {

$_SESSION['msg'] = "Please login before accessing your account.";

header('Location: login.php');

}

 

if ($_SESSION['AdminLevel'] == "Full") {

$SelectorFilter = " WHERE Status = 'Open'";

}

else {

$SelectorFilter = " WHERE Status = 'Open' AND UserID = ". $_SESSION['ID'];

}

 

if ($_REQUEST['fcn'] == "updateinfo") {

if ($_REQUEST['frmPassword'] != "" && $_REQUEST['frmEmail'] != "") {

$UpdateInfoSQL = "UPDATE Users SET Password = '". $_REQUEST['frmPassword'] ."', Email = '". $_REQUEST['frmEmail'] ."' WHERE ID = ". $_SESSION['ID'];

mysql_query($UpdateInfoSQL);

 

$_SESSION['msg'] = "Information updated successfully.";

header('Location: index.php');

}

else {

$_SESSION['msg'] = "Inclomplete form.  Please fill out all fields and try again.";

header('Location: index.php');

}

}

 

$UserInfoSQL = "SELECT * FROM Users WHERE ID = ". $_SESSION['ID'];

$UserInfo = mysql_fetch_array(mysql_query($UserInfoSQL));

 

if (isset($_SESSION['msg'])) {

echo "<p align=center><font color=red><strong>". $_SESSION['msg'] ."</strong></font></p>";

$_SESSION['msg'] = "";

}

?>

...A bunch of HTML here...  Line 47 snippet below.

 

Line 47:

<td width="400px"><?=UserInfo['ID']?></td>

 

 

This problem is driving me crazy so if anybody has any suggestions it would be greatly appreciated!

Aaron

Link to comment
Share on other sites

Why?  When this works just as good.  All he did was use short tags.

 

<td width="400px"><?php echo $UserInfo['ID']?></td>

 

<?php
echo '<td width="400px">';
$WHAT_THIS_IS_SUPPOSED TO TO BE= $UserInfo['ID']
?>
</td>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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