how to pass conditional variable to header function in php


Anwser:

You can assign varible to header function to redirect to  php file with conditional added to the url like http://localhost/project_list/viewuser.php?id=%229%22

$id=$_GET[‘id’];

$q = “UPDATE “.TBL_checklst.”  SET p_Duration=’$pDur’  WHERE id = $id”;
$database->query($q);
header(“Location: viewuser.php?id=”.$id);

Advertisements
About

myself pramodh kumar yet another php developer from India and have worked on oops,procedural,yii framework,codeigniter,wordpress,joomla,api and more.

Tagged with: , , , , , , , , , , ,
Posted in how to pass conditional variable to header function in php

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow php tutorial on WordPress.com
categories
Calendar
July 2012
M T W T F S S
« Jun   Sep »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Follow me on Twitter
Blog Stats
  • 73,741 hits
%d bloggers like this: