Re: setting a global var so that all pages can see var

From: Date: Mon, 17 Nov 2003 12:18:41 +0000
Subject: Re: setting a global var so that all pages can see var
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-169924@lists.php.net to get a copy of this message
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" <phplist@meidomus.com> wrote in message news:3FB8B2DB.1010407@meidomus.com... > 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. > > > > ;ö€V© > > œÏ¸î,$ nghttp://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=$tablename">View database</a><br> > > > > ~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."

« previous php.general (#169924) next »