PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 12th, 2004, 09:57 AM
sean2004 sean2004 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 11 sean2004 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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);
?>

Reply With Quote
  #2  
Old October 12th, 2004, 01:02 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 6
It should be
PHP Code:
if (isset($_POST['Var_Delivery_Date'])) { 


Note that I changed the ( ) from around the index name to [ ], $_POST is an array not a function.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Pls Help me with this Error PHP/MySQL Program


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT