User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,510 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,696 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 544 | Replies: 3 | Solved
Reply
Join Date: Dec 2007
Posts: 2
Reputation: miguel40 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
miguel40 miguel40 is offline Offline
Newbie Poster

Help How put "text" directly next to a variable in a URL?

  #1  
Dec 10th, 2007
How can I put "text" directly next to a variable in a URL?

My variable is $bandodd. It will have a numeric value.

In the resulting URL, I want the value of $bandodd to be right next to the text - "AA" - so it will look like this: "?size=32AA"

See the code below, which doesn't work. It doesn't read the variable because it thinks it's "$bandoddAA"

However, I can't figure out any character I can put in between the variable and the text that will "disappear" and make it 32AA in the URL.

Please help!

}

if(checkNum($val1) === TRUE && $val1 < 33 && $val2 - $val1 == 0 && $val2 + $val1 <= 120 && $val2 + $val1 >= 50 ){

header("Location: http://www.online.com/bra_school_bra_fit_calculator_test.php?size=$bandoddAA");

}
Last edited by miguel40 : Dec 10th, 2007 at 1:20 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: How put "text" directly next to a variable in a URL?

  #2  
Dec 10th, 2007
header("Location: http://www.online.com/bra_school_bra_fit_calculator_test.php?size=".$bandodd."AA");
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Dec 2007
Posts: 2
Reputation: miguel40 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
miguel40 miguel40 is offline Offline
Newbie Poster

Re: How put "text" directly next to a variable in a URL?

  #3  
Dec 10th, 2007
Awesome!!! Thank you so much!!!
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: How put "text" directly next to a variable in a URL?

  #4  
Dec 10th, 2007
you are welcome.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC