Re: Sending PHP variables through echo "<form>"
- From: AceX <AceIncorporated@xxxxxxxxx>
- Date: Mon, 4 Feb 2008 16:47:28 -0800 (PST)
On Feb 4, 2:31 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote:
AceX wrote:
I'm using a PHP script to regenerate repetitive paypal buttons and I'm
trying to make each button specific based on variables from that
current cycle.
I have this actually:
$paypalbutton='
First error: using single quotes instead of double quotes.
RTFM on the string type, specially on the subject of variable expansion.
<input type="hidden" name="amount" value=\"{$line[$p]}\">
Second error: mixing double quotes and escaped doble quotes inside a
single-quoted string.
Again, RTFM on strings, keeping special attention at the set of characters
that can be escaped in a single-quoted vs a double-quoted string.
[...] Will this whole idea even work?
Yes, it will. And if you re-read the manual a couple of times, the answer
will become obvious.
(Of course, if you don't get it, please reply)
(Note to others: I don't want to give away some posible solutions; I want
AceX to think)
Cheers,
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Si las mujeres son objetos, yo quiero programarlas!
Hi,
These are just my thoughts on why I made some of the mistakes. Thanks
for all your input I'll definitely be working on it.
My first error, the only reason I used single quotes is because the
form code is full of the double quotes. type="hidden", value="" and so
one. There is only one apostrophe in the whole thing so instead of
using double quotes for the echo and then having to delimit every one
of 'em, I used single quotes and only had to delimit 1. With static
amounts, the code works.
My second error,..I think I covered that in the first one..
Ok. so that's why I did what I did. Is that the wrong way of thinking
about it? I'll be reading up on this. Thanks. I guess I really just
wanted to know if it was possible, I didn't want to spend a lot of
time doing something and it all be for naught. As long as there's a
way, I'm happy to continue workin on my own. Thanks again guys.
AceX
.
- Follow-Ups:
- Re: Sending PHP variables through echo "<form>"
- From: Rik Wasmus
- Re: Sending PHP variables through echo "<form>"
- References:
- Sending PHP variables through echo "<form>"
- From: AceX
- Sending PHP variables through echo "<form>"
- Prev by Date: Namespaces
- Next by Date: Re: Namespaces
- Previous by thread: Re: Sending PHP variables through echo "<form>"
- Next by thread: Re: Sending PHP variables through echo "<form>"
- Index(es):