•
•
•
•
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
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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");
}
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.
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 239
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*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Error handling
- Next Thread: calendor control



Linear Mode