...

View Full Version : Php Parse Error Problem



Kura_kai
06-13-2005, 02:28 AM
I keep coming up with this error and i can not find the error
Error:


Parse error: parse error, expecting `')'' in /home/www/custompediatricorders.com/admin/view_action.php on line 7

File:


<?
include("../config.php");
include "aup.php";
function one($id)
{
$result = mysql_query("SELECT * FROM orders");
for($i=0;$i<$id:i++)
{
mysql_fetch_array($result, MYSQL_NUM)
}
mysql_fetch_array($result, MYSQL_NUM)
printf("<center> ID: %s <br> Name: %s <br> Email: %s <br> Business: %s <br> Street: %s <br> City: %s <br> State: %s <br> Zip: %s <br> Phone: %s <br> Description: %s <br> Excel Version: %s <br> Sample: %s <br> Link: %s <br> CD: %s <br> FlashDrive: %s <br><br>", $row[0], $row[2], $row[1], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9], $row[10].$row[11].$row[12].$row[13], $row[14], $row[15], $row[16], $row[17]);
Echo '<a href="admin_view_Orders.php">Back To View Selection</a>'<br>;
Echo '<a href="index.php">Back To Administration Section</a></center>';
}
function all()
{
$result = mysql_query("SELECT * FROM orders");
echo '<center>';
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
printf("ID: %s <br> Name: %s <br> Email: %s <br> Business: %s <br> Street: %s <br> City: %s <br> State: %s <br> Zip: %s <br> Phone: %s <br> Description: %s <br> Excel Version: %s <br> Sample: %s <br> Link: %s <br> CD: %s <br> FlashDrive: %s <br><br>", $row[0], $row[2], $row[1], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9], $row[10].$row[11].$row[12].$row[13], $row[14], $row[15], $row[16], $row[17]);
}
Echo '<a href="admin_view_Orders.php">Back To View Selection</a>'<br>;
Echo '<a href="index.php">Back To Administration Section</a></center>';
}
if($_POST['R1'] == "V1")
one((int)$_POST['D1']);
else
all();
?>

Thank you for anyone who helps me

Kurashu
06-13-2005, 02:56 AM
for($i=0;$i<$id:i++) should be for($i=0;$i<$id;i++)

ClubCosmic
06-13-2005, 03:01 AM
Dont forget the "$" in the final part:
for($i=0;$i<$id;$i++)

Kura_kai
06-13-2005, 03:03 AM
Oops i gave yall an older file here is the newer one


<?
include("../config.php");
include "aup.php";
function one($id)
{
$result = mysql_query("SELECT * FROM orders");
for($i=0;$i<$id;i++)
{
$row = mysql_fetch_array($result, MYSQL_NUM);
}
$row = mysql_fetch_array($result, MYSQL_NUM);
printf("<center> ID: %s <br> Name: %s <br> Email: %s <br> Business: %s <br> Street: %s <br> City: %s <br> State: %s <br> Zip: %s <br> Phone: %s <br> Description: %s <br> Excel Version: %s <br> Sample: %s <br> Link: %s <br> CD: %s <br> FlashDrive: %s <br><br>", $row[0], $row[2], $row[1], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9], $row[10].$row[11].$row[12].$row[13], $row[14], $row[15], $row[16], $row[17]);
Echo '<a href="admin_view_Orders.php">Back To View Selection</a>'<br>;
Echo '<a href="index.php">Back To Administration Section</a></center>';
}
function all()
{
$result = mysql_query("SELECT * FROM orders");
echo '<center>';
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
printf("ID: %s <br> Name: %s <br> Email: %s <br> Business: %s <br> Street: %s <br> City: %s <br> State: %s <br> Zip: %s <br> Phone: %s <br> Description: %s <br> Excel Version: %s <br> Sample: %s <br> Link: %s <br> CD: %s <br> FlashDrive: %s <br><br>", $row[0], $row[2], $row[1], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9], $row[10].$row[11].$row[12].$row[13], $row[14], $row[15], $row[16], $row[17]);
}
Echo '<a href="admin_view_Orders.php">Back To View Selection</a>'<br>;
Echo '<a href="index.php">Back To Administration Section</a></center>';
}
if($_POST['R1'] == "V1")
one((int)$_POST['D1']);
else
all();
?>

Nightfire
06-13-2005, 03:11 AM
Maybe this?


Echo '<a href="admin_view_Orders.php">Back To View Selection</a>'<br>;

You've got that twice


Echo '<a href="admin_view_Orders.php">Back To View Selection</a><br>';

Kura_kai
06-13-2005, 04:17 PM
Ok thank you for all the help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum