[PHP] setting a global var so that all pages can see var
Hello again guys, thanks for the help over the past 48 hours :) Over the past week i have had the job of tweaking the php pages of a friends site. so far so good :) Now i am onto the admin area for running the website. I downloaded one of the many db managers scripts from www.hotscripts.com Luckly its a very simple app, easy to mod. Anyways most of my php knowledge is in conjuction with flash www.innovativedesigns.org.uk. most of the problems i have had here have been fairly simple to learn and fix. Now the job this week is with php+html (total newbie to this area). most of the problems i have been able to fix with some help from here as well. http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html ~This is the admin area. I manged to get the drop down menu working to select the revelent table and then set $tablename with the result being displayed in the next page as: ? print MyAdmin database for i$tablename/i table; ? The new page has 4 links to load other php files to edit,delete, view, and add new data to the DB On the links have: a href=edit.php?tablename=$tablenameView database/abr ~Now in the edit.php i have : $result = mysql_query(SELECT * FROM $tablename)or die(couldnt select table); $tablename is not being passed with the link. What am i missing? Cheers Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting a global var so that all pages can see var
PAUL FERRIE wrote: Hello again guys, thanks for the help over the past 48 hours :) Over the past week i have had the job of tweaking the php pages of a friends site. so far so good :) Now i am onto the admin area for running the website. I downloaded one of the many db managers scripts from www.hotscripts.com Luckly its a very simple app, easy to mod. Anyways most of my php knowledge is in conjuction with flash www.innovativedesigns.org.uk. most of the problems i have had here have been fairly simple to learn and fix. Now the job this week is with php+html (total newbie to this area). most of the problems i have been able to fix with some help from here as well. http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html ~This is the admin area. I manged to get the drop down menu working to select the revelent table and then set $tablename with the result being displayed in the next page as: ? print MyAdmin database for i$tablename/i table; ? The new page has 4 links to load other php files to edit,delete, view, and add new data to the DB On the links have: a href=edit.php?tablename=$tablenameView database/abr ~Now in the edit.php i have : $result = mysql_query(SELECT * FROM $tablename)or die(couldnt select table); $tablename is not being passed with the link. What am i missing? RTFM @ http://www.php.net/security.registerglobals STFA This question is another one of those twice daily ones. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting a global var so that all pages can see var
lol i not that feeling whaen it come to flash based questions ;) Cheers] Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PAUL FERRIE wrote: Hello again guys, thanks for the help over the past 48 hours :) Over the past week i have had the job of tweaking the php pages of a friends site. so far so good :) Now i am onto the admin area for running the website. I downloaded one of the many db managers scripts from www.hotscripts.com Luckly its a very simple app, easy to mod. Anyways most of my php knowledge is in conjuction with flash www.innovativedesigns.org.uk. most of the problems i have had here have been fairly simple to learn and fix. Now the job this week is with php+html (total newbie to this area). most of the problems i have been able to fix with some help from here as well. http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html ~This is the admin area. I manged to get the drop down menu working to select the revelent table and then set $tablename with the result being displayed in the next page as: ? print MyAdmin database for i$tablename/i table; ? The new page has 4 links to load other php files to edit,delete, view, and add new data to the DB On the links have: a href=edit.php?tablename=$tablenameView database/abr ~Now in the edit.php i have : $result = mysql_query(SELECT * FROM $tablename)or die(couldnt select table); $tablename is not being passed with the link. What am i missing? RTFM @ http://www.php.net/security.registerglobals STFA This question is another one of those twice daily ones. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting a global var so that all pages can see var
I am still stuck I now have this in the navigation page ?php if (isset($_GET['tablename'])) { echo loaded b{$_GET['tablename']}/b; } else { i$tablename/i did not get sent; } ? this gets the tablename from the previous page from the dropdown menu but still the other pages are not picking it up :( Please i need to get this working Cheers paul Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PAUL FERRIE wrote: Hello again guys, thanks for the help over the past 48 hours :) Over the past week i have had the job of tweaking the php pages of a friends site. so far so good :) Now i am onto the admin area for running the website. I downloaded one of the many db managers scripts from www.hotscripts.com Luckly its a very simple app, easy to mod. Anyways most of my php knowledge is in conjuction with flash www.innovativedesigns.org.uk. most of the problems i have had here have been fairly simple to learn and fix. Now the job this week is with php+html (total newbie to this area). most of the problems i have been able to fix with some help from here as well. http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html ~This is the admin area. I manged to get the drop down menu working to select the revelent table and then set $tablename with the result being displayed in the next page as: ? print MyAdmin database for i$tablename/i table; ? The new page has 4 links to load other php files to edit,delete, view, and add new data to the DB On the links have: a href=edit.php?tablename=$tablenameView database/abr ~Now in the edit.php i have : $result = mysql_query(SELECT * FROM $tablename)or die(couldnt select table); $tablename is not being passed with the link. What am i missing? RTFM @ http://www.php.net/security.registerglobals STFA This question is another one of those twice daily ones. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com --- Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting a global var so that all pages can see var
PAUL FERRIE wrote: ... add new data to the DB On the links have: a href=edit.php?tablename=$tablenameView database/abr U are outputting those links incorrectly, because resulting HTML contains $tablename. Try output those links this way... a href=edit.php?tablename=? echo $_GET['tablename'] ?View database/abr ...or this way ? echo 'a href=edit.php?tablename='.$_GET['tablename'].'View database/abr'; ? -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting a global var so that all pages can see var
* Thus wrote PAUL FERRIE ([EMAIL PROTECTED]): Hello again guys, thanks for the help over the past 48 hours :) Over the past week i have had the job of tweaking the php pages of a friends site. so far so good :) Now i am onto the admin area for running the website. I downloaded one of the many db managers scripts from www.hotscripts.com You should try phpmyadmin, you wont have to meddle around with the code except for configuring it, which can be done in less than 30 seconds. http://www.phpmyadmin.net/ Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php