...

View Full Version : Error help



SBDTHRU
03-04-2010, 12:52 AM
I'm getting


Parse error: syntax error, unexpected T_ECHO in /home/sbdthru/public_html/addgroup.php on line 10

Really dunno why. :confused:
Any help is appreciated.


<?
ob_start();
include("config.php");
if($logged[username] && $logged[level] == Admin)
{
$user = mysql_query("SELECT * from stake where username = '$_GET[stake]'");
$user = mysql_fetch_array($stake).
//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%'>
<font type='verdana' size='2'>Add New Limit
</td>
<td align='left'>
<input type='text' size='25' maxlength='25' name='stake'
value=''></td>
</tr>
<tr>
<td align='center'>
</td>

<td align='left'>
<input type='submit' name='update' value='Submit'></td>
</tr>
</table>
</form>
</div>");
//displays the html form
}
else
{
$stake = htmlspecialchars($_POST[stake]);
// the above lines get rid of all html.
echo ("<meta http-equiv='REFRESH' content='1;url=mysite.com/admincp.php'>$_GET[user]'s profile has been updated.");
$update = mysql_query("location = 'stake = '$stake'");
// updates the information in the database.
}
?>

MattyUK
03-04-2010, 01:36 AM
$user = mysql_fetch_array($stake).

Could you have meant?

$user = mysql_fetch_array($stake);

Matt

Ndogg
03-04-2010, 01:51 AM
echo ("<meta http-equiv='REFRESH' content='1;url=http://gator44.hostgator.com/~sbdthru/admincp.php'>$_GET[user]'s profile has been updated.");
$update = mysql_query("location = 'stake = '$stake'");

For the first line, try this:


echo "<meta http-equiv='REFRESH' content='1;url=http://gator44.hostgator.com/~sbdthru/admincp.php'>$_GET[user]'s profile has been updated.";

and for the second line, I have no idea what your even trying to do there

masterofollies
03-04-2010, 04:02 AM
Here use this one.


<?
ob_start();
include("config.php");
if (($logged['username']) && $logged['level'] == 'Admin')
{
$user = mysql_query("SELECT * from stake where username = '".$_GET['stake']."'");
$user2 = mysql_fetch_array($stake);
//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%'>
<font type='verdana' size='2'>Add New Limit
</td>
<td align='left'>
<input type='text' size='25' maxlength='25' name='stake'
value=''></td>
</tr>
<tr>
<td align='center'>
</td>

<td align='left'>
<input type='submit' name='update' value='Submit'></td>
</tr>
</table>
</form>
</div>";
//displays the html form
}
else
{
$stake = htmlspecialchars($_POST['stake']);
// the above lines get rid of all html.
echo "<meta http-equiv='REFRESH' content='1;url=mysite.com/admincp.php'>".$_GET['user']."'s profile has been updated.";
$update = mysql_query("location = 'stake = '$stake'");
// updates the information in the database.
}
?>

But I have no clue what you are trying to do here

$update = mysql_query("location = 'stake = '$stake'");

Ndogg
03-04-2010, 04:53 AM
Lol, You just practically did the same thing I said, except I missed one thing.

SBDTHRU
03-11-2010, 03:18 AM
I knew that the last part was wrong. I am trying to get the form to submit the information to the db.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum