Looking at it too long

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

Post Reply
dcoffin
Forum Newbie
Posts: 1
Joined: Sun Jun 12, 2005 4:14 pm

Looking at it too long

Post by dcoffin »

Does anyone see a problem with this code? Especially the later part?

Code: Select all

<?php
if (is_numeric($_GET&#1111;'record'])) {
   $current = $_GET&#1111;'record'];
} elseif (isset($_POST&#1111;'broadcast_em_id]))	{ 
   $current = $_GET&#1111;'broadcast_em_id'];
}
?>
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Code: Select all

<?php
if (is_numeric($_GET['record'])) {
   $current = $_GET['record'];
} elseif (isset($_GET['broadcast_em_id']))	{ 
   $current = $_GET['broadcast_em_id'];
}
?>
You mixed up POST and GET and also missed a closing single quote on the elseif line.
Post Reply