[PHP] globals not working?
I have an odd problem. I have a file called "evt_to_web.php". This file contains some variable assignments and a few functions. I have used require_once "evt_to_web.php"; in another file, indextest.php. In indextest.php, I then call a function that is in evt_to_web.php. That function cannot seem to see it's own global variables, even though I have used "global ;". I'm pulling my hair out. Here is "evt_to_web.php": $evthostname = "localhost"; $evtusername = "paukai"; $evtpassword = "imctiger88"; $evtdatabase = "imc_evts"; $evtevents_table = "evt_events"; // Table where all events will be stored. $evtclient_table = "evt_clients"; // The owners of events and their login info $evtcategory_table = "evt_cats"; // Small table with categories for event sorting // Administration password $evtadmin_password = "imccalendar"; $evtimg_dir = "images/"; // Webmaster, in case of error: $evtwebmaster = "[EMAIL PROTECTED]"; // Redir site in case of error: $evtredir_site = "http://www.illinimedia.com/";; function testGlobal() { global $evtredir_site; echo "TestGlobal: '$evtredir_site'\n"; } When I do "testGlobal();" I get: TestGloal: '' Showing me that the function testGlobal thinks that $everedir_site is empty. What have I done wrong here?? Thanks, Paul Kaiser -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forming HTTP Header to POST
Greetings, With register_globals off, I can no longer call specific functions form my PHP script by linking text/graphic as such: http://www.mysite.com/mydb/myevts.php?action=add_event What I need to do, of course, is get "add_event" sent in something like a POST command. I could make a page with a bunch of forms / buttons / etc. but this is ugly. With the header() function, shouldn't I be able to make an HTTP header that would simulate POSTing from a form? Or is there some other way I can simulate POSTing from a form? My goal is for the user to be able to click on what appears to be an ordinary link (text or picture) and have that click "POST" my action=add_event to myevts.php. Any ideas? Thanks, Paul Kaiser -- Illini Media: 265-9844 Home: 351-8149 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quick way to test series of integers
Hey there, I have around 50 checkboxes on an HTML form. Their "value" is "1". So, when a user check the box, then no problem -- the value returned by the form is "1" and I can enter that into my SQL database. HOWEVER... If the user does not check the box, I'm in trouble, because the "value" does not default to "0", but rather I'm guessing... mysql query doesn't like my trying to pass NOTHING. I COULD go through each of the 50 returned variables and, if they are not "1", assign "0" to them. But I'm wondering if there is a better way to go about this?? Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Magic Quotes performance hit?
Greetings, Is there a performance penalty for having magic_quotes_runtime turned on all the time? Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php