Re: [PHP] basic php question...
?php header(location: pagetogoto.php); ? There can be no output before this (even whitespace before open php tags) Kaleb On Nov 4, 2008, at 1:41 PM, bruce wrote: and what's the best way to do the redirect sample code would be cool! -Original Message- From: Micah Gersten [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2008 11:33 AM To: bruce Cc: php-general@lists.php.net Subject: Re: [PHP] basic php question... Is anything changing on the page? If not, AJAX might be the way to go, http://xajaxproject.org Otherwise, pass the parameters you want to foo.php and have it redirect to the proper page with the proper arguments. Another alternative, is to store the parameters in the session and pass them from foo.php without passing them to it. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com bruce wrote: hi guys...foo i've got a button that i want to select, and i want the app to process some logic, and then return the user to the page. my question is how?? something like base page: a href=foo.phpbutton link/a foo.php -process logic -return the user to the base page, with the same querystring that was initially used to generate the initial base page foo.php doesn't have any display function, just the logic thoughts/sample php pages/psuedo code chunks... thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Dev Facts
On Oct 16, 2008, at 6:14 PM, Nathan Rixham wrote: Evening All, I'd be /really/ interested to know who uses what! *Procedural or OOP?* OOP Always *Dev OS* OS X *Dev PHP Version* 5.2.x *Live Server OS* OpenSuse/Redhat *Live Server PHP Version* 5.2.x *Which HTTP Server Software (+version)?* Apache *IDE / Dev Environment* Netbeans 6.5 (beta) for big projects Textmate for small one offs *Preferred Framework(s)?* Home grown + Smarty Templating Engine *Do you Unit Test?* heh... *Preferred OS CMS* Wordpress for speed, smarty for anything else *Anything else you use frequently in you're PHP'ing that's worth mentioning:* Not php exactly, but strongly related: JQuery for all javascript/ ajax needs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP Brain Teasers
A ticket, a tasket, a red and yellow basket -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Friday, July 06, 2007 2:59 AM To: Daniel Brown Cc: Larry Garfield; php-general@lists.php.net Subject: Re: [PHP] Re: PHP Brain Teasers Daniel Brown wrote: Let's get obscure try to guess it before running the code. It actually shouldn't be difficult. I tried to figure it out - I couldn't, I ran the code and I still don't get it. oh well :-) ? class Brainteaser { function paint($original_image,$rgb_string1,$rgb_string2,$input1,$input2) { header(Content-type: image/png); $im = imagecreatefromjpeg($original_image); $rgb1 = explode(',',$rgb_string1); $rgb2 = explode(',',$rgb_string2); $color1 = imagecolorallocate($im,$rgb1[0],$rgb1[1],$rgb1[2]); $color2 = imagecolorallocate($im,$rgb2[0],$rgb2[1],$rgb2[2]); $px = (imagesx($im) - 7.5 * strlen($input1)) / 2; imagestring($im, 50, $px, 90, $input2, $color1); imagestring($im, 50, ($px + 30), 120, $input1, $color2); imagepng($im); imagedestroy($im); } } $objects = new Brainteaser(); $objects-original_image = http://www.sewterific.com/images/Just%20Baskets/SmPicnicBasket.jpg;; $_SCRIPT[word] = task; $_SCRIPT[otherword] = ticket; $update_word1 = $_SCRIPT[word].et; $rgb1 = 134,89,32; $rgb2 = 231,223,48; $objects-paint($objects-original_image,$rgb1,$rgb2,$update_word1,str_r eplace(c,s,$_SCRIPT[otherword])); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP Brain Teasers
Which came first, the chicken or the egg? -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Thursday, July 05, 2007 2:56 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: PHP Brain Teasers $which = isset($_GET['chicken']) ? $_GET['egg'] : null; Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Loading a URL
/*I am trying to load an XML file from the following site, which btw is a working site you can put in the address bar.*/ $url = http://isbndb.com/api/books.xml?access_key=WC2BD24Wresults=pricesindex1=isbnvalue1=030681496x;; //open the url if(!($handle = fopen($url, r))){ echo Error opening URL br /.$url; exit(); } else{ echo It Worked; //actually use simpleXML and parse it, but that's not the problem. } /* *For some reason that code returns: *Error opening URL *http://isbndb.com/api/books.xml?access_key=WC2BD24Wresults=pricesindex1=isbnvalue1=030681496x *Is there something obvious that I am missing, or what? */
RE: [PHP] Loading a URL
That's it. Thanks a bunch Robert -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Thu 05-Jul-07 8:53 PM To: Kaleb Pomeroy Cc: php-general@lists.php.net Subject: Re: [PHP] Loading a URL On Thu, 2007-07-05 at 20:39 -0500, Kaleb Pomeroy wrote: /*I am trying to load an XML file from the following site, which btw is a working site you can put in the address bar.*/ $url = http://isbndb.com/api/books.xml?access_key=WC2BD24Wresults=pricesindex1=isbnvalue1=030681496x;; //open the url if(!($handle = fopen($url, r))){ echo Error opening URL br /.$url; exit(); } else{ echo It Worked; //actually use simpleXML and parse it, but that's not the problem. } /* *For some reason that code returns: *Error opening URL *http://isbndb.com/api/books.xml?access_key=WC2BD24Wresults=pricesindex1=isbnvalue1=030681496x *Is there something obvious that I am missing, or what? */ Check your configuration to see the value of: allow_url_fopen Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `'