PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
nexus6
Forum Newbie
Posts: 20 Joined: Fri Jun 17, 2005 3:50 am
Location: Denmark
Post
by nexus6 » Thu Jul 07, 2005 8:55 pm
I get this error:
"Parse error: syntax error, unexpected T_BOOLEAN_AND" on line 19.
Code: Select all
line 18 if (isset($_POST['tableName']))
19 && isset($_POST['item_id'])
20 $table = sqlite_escape_string($_POST['tableName']);
21 $id = sqlite_escape_string($_POST['item_id']);
22
23
24 if (isset($_POST['Delete'])) {
25 echo "Delete";
26 if (!empty($_POST['item_id'])) {
27 $id = sqlite_escape_string($_GET['item_id']);
28 $query = "DELETE FROM $table WHERE item_id='$id'";
29 $result = sqlite_query($handle, $query) or die("Error in query:
".sqlite_error_string(sqlite_last_error($handle)));
30 }
31 } else {
in line 19 the problem is "&& isset" is there a alternative instead og "&&" (i have tried the "AND") or kan somebody help me correct this problem.
Last edited by
nexus6 on Thu Jul 07, 2005 9:06 pm, edited 1 time in total.
hawleyjr
BeerMod
Posts: 2170 Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA
Post
by hawleyjr » Thu Jul 07, 2005 9:03 pm
Your parentheses are messed up:
Code: Select all
line 18 if (isset($_POST['tableName']))
19 && isset($_POST['item_id'])
Should be:
Code: Select all
line 18 if (isset($_POST['tableName'])
19 && isset($_POST['item_id']))
nexus6
Forum Newbie
Posts: 20 Joined: Fri Jun 17, 2005 3:50 am
Location: Denmark
Post
by nexus6 » Thu Jul 07, 2005 9:05 pm
YES! it works - Thanks!