- Impact
- 1
I am attempting to write a control panel area for a site I'm working on for myself . This is my first attempt at coding an entire site from scratch and has been a great learning experience so far thanks to the members here at NP.
Anyways here is my current problem. I want to pass a variable through the url to another page which I thought would be no problem but I can't get it to work. Actually its 2 variables the first of which works fine without any problems.
Current Example URL is : http://www.kmcustoms.com/greenup/cp.php?id=edit_article&cid=?
id=edit_article is the variable that tells it which template to get, this works fine.
cid=?, The ? is suppose to be replaced by the id for the article stored in the database. It does create the link correct or should I say how I told it to. If that is the correct way to setup the url then I know my problem is on the edit_article page.
Now in the edit_article code I'm using this to get the variable info.
$id = $_REQUEST["cid"];
when I run it I don't get any of the information for the article with the given variable. Help Please!
*Updated*
Never mind I got it fixed. I was defining data for the output as ex: $row["title"] but hadn't defined what $row was. Still correct me if there is a better way to do this than I posted above.
Anyways here is my current problem. I want to pass a variable through the url to another page which I thought would be no problem but I can't get it to work. Actually its 2 variables the first of which works fine without any problems.
Current Example URL is : http://www.kmcustoms.com/greenup/cp.php?id=edit_article&cid=?
id=edit_article is the variable that tells it which template to get, this works fine.
cid=?, The ? is suppose to be replaced by the id for the article stored in the database. It does create the link correct or should I say how I told it to. If that is the correct way to setup the url then I know my problem is on the edit_article page.
Now in the edit_article code I'm using this to get the variable info.
$id = $_REQUEST["cid"];
when I run it I don't get any of the information for the article with the given variable. Help Please!
*Updated*
Never mind I got it fixed. I was defining data for the output as ex: $row["title"] but hadn't defined what $row was. Still correct me if there is a better way to do this than I posted above.
Last edited:








