|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Pls Help me with this Error PHP/MySQL Program
Hello!
Can any one pls help me with the error I am getting on this one.... Parse error: parse error, unexpected '(', expecting ',' or ')' in c:\phpdev5\www\dietary\tmp26vq15h24r.php on line 36 this is the line 36.... if (isset($_POST('Var_Delivery_Date'))) { ---------------------------------------- any immediate help is highly appreciated... Regards, Sean <?php require_once('Connections/MyConn.php'); ?> <?php include "mysql_data.inc"; include "dropdate.inc"; // Drop date drop down menu library mysql_select_db(Dietary); //If the date is there because the SUBMIT button was pushed then print it //You probably should use $_POST['dropdate'] in the if statment below. if ($Var_Delivery_Date != "") { echo "The date returned from the control is: " . $Var_Delivery_Date; } echo "<form>\n"; DateDropDown(30,"Var_Delivery_Date"); // echo "<input type=submit>\n"; echo "</form>\n"; //query to get info $result = mysql_query("SELECT Home_Name FROM homes"); if (!$result) { echo 'Could not run query: '.$result."\n". mysql_error(); exit; } echo '<select name="Var_Home_Name">'; for ($i=0; $row = mysql_fetch_assoc($result); $i++) { echo '<option>'.($row["Home_Name"]).''; } echo '</select>'; //<?php $Var_rsHomes = "''"; if (isset($_POST('Var_Delivery_Date'))) { $Var_rsHomes = (get_magic_quotes_gpc()) ? $_POST('Var_Delivery_Date') : addslashes($_POST('Var_Delivery_Date')); } $Var_rsHomes = "''"; if (isset($_POST('Var_Home_Name'))) { $Var_rsHomes = (get_magic_quotes_gpc()) ? $_POST('Var_Home_Name') : addslashes($_POST('Var_Home_Name')); } mysql_select_db($database_MyConn, $MyConn); $query_rsHomes = "SELECT * FROM order_main, order_transac WHERE order_main.Order_ID=order_transac.Order_ID AND order_main.Delivery_Date = 'Var_Delivery_Date' AND order_main.Home_Name = 'Var_Home_Name' "; $rsHomes = mysql_query($query_rsHomes, $MyConn) or die(mysql_error()); $row_rsHomes = mysql_fetch_assoc($rsHomes); $totalRows_rsHomes = mysql_num_rows($rsHomes); ?> //?> <table border="1"> <tr> <td>Order_ID</td> <td>Home_Name</td> <td>Delivery_Date</td> <td>Submission_Name</td> <td>Actual_Date</td> <td>Order_ID</td> <td>Food_ID</td> <td>Qty</td> </tr> <?php do { ?> <tr> <td><?php echo $row_rsHomes['Order_ID']; ?></td> <td><?php echo $row_rsHomes['Home_Name']; ?></td> <td><?php echo $row_rsHomes['Delivery_Date']; ?></td> <td><?php echo $row_rsHomes['Submission_Name']; ?></td> <td><?php echo $row_rsHomes['Actual_Date']; ?></td> <td><?php echo $row_rsHomes['Order_ID']; ?></td> <td><?php echo $row_rsHomes['Food_ID']; ?></td> <td><?php echo $row_rsHomes['Qty']; ?></td> </tr> <?php } while ($row_rsHomes = mysql_fetch_assoc($rsHomes)); ?> </table> <?php mysql_free_result($rsHomes); ?> |
|
#2
|
||||
|
||||
|
It should be
PHP Code:
Note that I changed the ( ) from around the index name to [ ], $_POST is an array not a function. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Pls Help me with this Error PHP/MySQL Program |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|