RE: [PHP] Passing variables
| From: | Jake McHenry | Date: | Thu, 22 Mar 2007 23:18:41 +0000 |
| Subject: | RE: [PHP] Passing variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251142@lists.php.net to get a copy of this message | ||
I was going to say the same thing, but was too busy to worry about it
> -----Original Message-----
> From: Chris [mailto:dmagick@gmail.com]
> Sent: Thursday, March 22, 2007 7:14 PM
> To: Tijnema !
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Passing variables
>
> Tijnema ! wrote:
> > On 3/22/07, Jeff <akaman@akaproz.com> wrote:
> >> I want to thank you all for clearing me up on setting the
> >> register_globals
> >> to ON issue!! I have refrained from doing so and my code
> is running great
> >> with the $_GET.
> >>
> >> I am having NO trouble passing my "single" variable to the
> next page
> >> using..
> >>
> >> echo "<A
> >> href=\"char_edit_form.php?charid=$charid\">Edit</A>";
> >>
> >> as when the next page that load actually shows the
> character info, so
> >> basically you can see you are dealing with the correct record.
> >>
> >> NOW.............
> >>
> >> I want to pass two variables to a delete page. The charid
> and the char
> >> name.
> >> Here is what I have but it will only pass the 1st variable ?charid
> >>
> >> echo "<A href=\"delete_char.php?charid=$charid
> >> ?char=".$myrow["char_name"]."\">Delete</A>";
> >>
> >> I get the 1st variable using the $charid =
> (int)$_GET['charid']; (on the
> >> next page)
> >>
> >> I do however NOT get
> >>
> >> $charname = $_GET["char"] to pull the name out. (on the next page)
> >>
> >> I've tried putting a comma, a &, a % between the variables ie..
> >>
> >> echo "<A href=\"delete_char.php?charid=$charid &
> >> ?char=".$myrow["char_name"]."\">Delete</A>";
> >>
> >> but it just won't let me pull the $_GET["char"]
> >>
> >> I have even tried $_GET['char'] but am under the
> impression '_' are for
> >> integers and "_" are for text?
> > This is bullshit, ' and " do the same.
>
> There's no need to swear at someone for asking a question.
>
> And there is a difference between ' and ":
>
> <?php
> $animal = 'dog';
> echo 'I have a $animal as a pet<br/>\n';
> echo "I have a $animal as a pet<br/>\n";
> ?>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.17/730 - Release
> Date: 3/22/2007 7:44 AM
>
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 3/22/2007
7:44 AM