Jump to content

passing a variable in the URL or by form


coolphpdude

Recommended Posts

Hi there,

 

This problem will help me fix another issue so i'm starting a new thread for it.

 

My problem... Im passing the variable c_id to the page classprofile.php using the following method...

 

printf("<tr cellpadding='10'><td cellpadding='10'><font face='arial'><font color='#648CC8'><a href=\"classprofile.php?id=%s\">%s</font></a></td>", $myrow["c_id"], $myrow["c_id"]); 

 

...A search query is ran using c_id to find all of the details on that class. However on this page i run a delete command on this page and once the command runs it refreshes the page and loses the c_id variable that was passed in the URL. does anybody have an idea how i can work around this?

 

I was considering resending the c_id through the same form the delete works off and picking up the ' $id=$_POST["c_id"]; ' when the page has refreshed but i need to know 3 things first...

 

1) Is there an easier way to do this?

 

2) Will this work??

 

3) if it will work how do i do it???

 

thanks in advance

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.