function call
Posted: Sun Feb 13, 2005 1:32 pm
Hello everyone, I have a problem and new to php if someone could help me out. I have case statement
with a variable that is set to 'edit'. The case statement 'edit' is called however the function dosen't get called. This code is all above the html.
Here in the function I have some echo statements that are not called.
Thanks
twb
with a variable that is set to 'edit'. The case statement 'edit' is called however the function dosen't get called. This code is all above the html.
Code: Select all
$task_id = !empty($_REQUESTї'task_id']) ? $_REQUESTї'task_id'] : "";
$action = !empty($_REQUESTї'action']) ? $_REQUESTї'action'] : "add";Code: Select all
switch ($action){
case "edit":
echo "test edit 1"; //this does print
Edit_Task($task_id);
echo " test edit 3 "; //this doesn't print
break;
}//end switchCode: Select all
function Edit_Task($task_id){
echo "test Function Edit_Task"; ///this doesn't print
$query = 'SELECT * FROM calander WHERE task_id = $task_id';
echo "<br> $query "; //this dosen't print
$result = mysql_query($query);
if(!$result){
echo "Error in Search Results". mysql_error();}
else{
$row = mysql_fetch_array($result);
$task_name = $rowї'task_name'];
$task_description = $rowї'task_description'];
$task_date = $rowї'task_date'];
$task_time = $rowї'task_time']; }//close elsetwb