Jump to content

[SOLVED] sending varibles


alienmojo

Recommended Posts

$accountnum=$row['accountnum'];
echo '<center>';
echo '<a href="descrip.php?accountnum=$accountnum">';

im trying to send a varible through to descrip.php. instead of sending the value of $accountnum is sending the physical sting "$accountnum" im not sure how to fix this
Link to comment
Share on other sites

[quote]Or, if you prefer to use double quoted HTML attributes like the XHTML specs say[/quote]

Funnily enough, there is nothing in the specs that says you must use double quotes. I thought so for a long time aswell.
Link to comment
Share on other sites

[quote author=thorpe link=topic=121437.msg499349#msg499349 date=1168216952]
[quote]Or, if you prefer to use double quoted HTML attributes like the XHTML specs say[/quote]

Funnily enough, there is nothing in the specs that says you must use double quotes. I thought so for a long time aswell.
[/quote]
http://www.w3.org/TR/xhtml1/#h-4.4

I looked it up just the other day. I said XHTML. It might not be in HTML, but w3 urges to use XHTML now.
Link to comment
Share on other sites

$accountnum=$row['accountnum'];
echo '<center>';
echo "<a href=\"descrip.php?accountnum=$accountnum\">";

As with Perl, I'm pretty sure php does variable interpolation within double quotes and remains verbatim with single quotes. In this case it would be just as easy to stay with double quotes on your last statement and escape the inner html qoutes. Your $accountnum will still be replaced.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.