RE: [PHP] newbie question about variables

From: Date: Mon, 09 Apr 2001 15:06:24 +0000
Subject: RE: [PHP] newbie question about variables
Groups: php.general 
Request: Send a blank email to php-general+get-47803@lists.php.net to get a copy of this message
Thanks Maxim for your help, If you have a sec could you also please tell me how PHP does the variables? When you say JS uses your browser as it's server and PHP uses the remote server, are you referring to the way they call their functions? Thanks Kynan > -----Original Message----- > From: PHPBeginner.com [SMTP:php-general@phpbeginner.com] > Sent: Monday, April 09, 2001 3:00 PM > To: Cheng, Kynan (London); php-general@lists.php.net > Subject: RE: [PHP] newbie question about variables > > Yes, you were right, this works just the way you wrote. > > And yes, there is a JavaScript way to do it, but I guess PHP is better for > this kind of jobs. JavaScript is using your browser as it's 'server' while > PHP uses your remote server. Therefore, all PHP will do is generate HTML > code to send to client. Make a way it dynamically assigns you the right > image and, vuala! Just if you would have coded that HTML page yourself. No > JavaScript. > > > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > > PHPBeginner.com (Where PHP Begins) > maxim@phpbeginner.com > www.phpbeginner.com > > > > > > > > -----Original Message----- > From: Cheng, Kynan (London) [mailto:ChengKyn@exchange.uk.ml.com] > Sent: Monday, April 09, 2001 5:37 PM > To: 'php-general@lists.php.net' > Subject: RE: [PHP] newbie question about variables > > > Hi, > > I have not coded script in html before, so I was wondering if someone > could > look this over briefly: > > I'm a bit confused as to how variables are passed/stored. Do the > variables > get saved on the client machine? Do they have to be specifically passed > from > page to page and back? Are they automatically returned to the calling > page? > > > If I have a page with thumbnail, and I'd like to call a page that > dynamically places the original photo into it (based on the thumbnail > clicked) does it go a little something like this? > > in index.html: > <a href="picture.html?var=pictureone.jpg"><img > src="thumbnail.gif"></a> > > in picture.html > <a href="index.html"><img src="<?php print $var > ?>"</a> > > > Is there a similar javascript method? > > Thanks > Kynan > > > > -----Original Message----- > > From: Philip Olson [SMTP:philip@cornado.com] > > Sent: Sunday, April 08, 2001 10:52 PM > > To: Victor > > Cc: php-general@lists.php.net > > Subject: Re: [PHP] newbie question about variables > > > > > > Something like the following HTML : > > > > <a href="foo.php?var=1"><img src="img1.gif"></a> > > <a href="foo.php?var=2"><img src="img2.gif"></a> > > <a href="foo.php?var=3"><img src="img3.gif"></a> > > > > And in foo.php have : > > > > print $var; // 1 or 2 or 3 > > > > Also consider the following : > > > > <a href="<?php echo $PHP_SELF; ?>?var=1"><img > > src="img1.gif"></a> > > > > To have it load the current page rather then foo.php. > > > > regards, > > philip > > > > > > On Mon, 9 Apr 2001, Victor wrote: > > > > > Hello, > > > > > > Is there any (easy) way to let a user to set the value of a > > > variable by simply clicking on a hyperlink on a web page? > > > I mean if I have a 3 links on a page if the user clicks on image1 to > > > set a variable $var=1,if clicks on image2 to set it as > > > $var=2,etc. > > > > > > Any suggestions (including RTFMs ;-)) are wellcome. > > > > > > > > > Best regards, > > > Victor > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#47803) next »