Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Php Parse Error Problem

    I keep coming up with this error and i can not find the error
    Error:
    PHP Code:
    Parse errorparse errorexpecting `')'' in /home/www/custompediatricorders.com/admin/view_action.php on line 7 
    File:
    PHP Code:
    <?
    include("../config.php");
    include 
    "aup.php";
    function 
    one($id)
    {
        
    $result mysql_query("SELECT * FROM orders");
        for(
    $i=0;$i<$id:i++)
        {
          
    mysql_fetch_array($resultMYSQL_NUM)
        }
        
    mysql_fetch_array($resultMYSQL_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($resultMYSQL_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

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    for($i=0;$i<$id:i++) should be for($i=0;$i<$id;i++)

  • #3
    Regular Coder
    Join Date
    May 2004
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dont forget the "$" in the final part:
    for($i=0;$i<$id;$i++)

  • #4
    Regular Coder
    Join Date
    Dec 2004
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oops i gave yall an older file here is the newer one
    PHP Code:
    <?
    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($resultMYSQL_NUM);
        }
        
    $row mysql_fetch_array($resultMYSQL_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($resultMYSQL_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();
    ?>

  • #5
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Maybe this?
    PHP Code:
    Echo '<a href="admin_view_Orders.php">Back To View Selection</a>'<br>; 
    You've got that twice
    PHP Code:
    Echo '<a href="admin_view_Orders.php">Back To View Selection</a><br>'

  • #6
    Regular Coder
    Join Date
    Dec 2004
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok thank you for all the help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •