Parameter passing

W

Will Roberts

I want to load a link in another frame (easy peasy), but now I want to pass
a parameter as part so that the html or php file can display the right
stuff. I'm sure this must be easy, but I've been scratching my head and
trying all sorts of increasingly desperate and bizarre code all afternoon.
Someone please enlighten me.
 
T

The Doormouse

Will Roberts said:
I want to load a link in another frame (easy peasy), but now I want to
pass a parameter

You need more fiber. Maybe that's what they mean by "Fiber Optics" ...

=)

The Doormouse
 
W

Whitecrest

I want to load a link in another frame (easy peasy), but now I want to pass
a parameter as part so that the html or php file can display the right
stuff. I'm sure this must be easy, but I've been scratching my head and
trying all sorts of increasingly desperate and bizarre code all afternoon.
Someone please enlighten me.

And you can't pass the parameter in the URL? (or in the form)
 
A

Adrienne

I want to load a link in another frame (easy peasy), but now I want to
pass a parameter as part so that the html or php file can display the
right stuff. I'm sure this must be easy, but I've been scratching my
head and trying all sorts of increasingly desperate and bizarre code
all afternoon. Someone please enlighten me.

<a href="somepage.php?text=Supercalifragilisticexpialidocious"
target="main">Some Page</a>
 
M

Mitja

Adrienne said:
<a href="somepage.php?text=Supercalifragilisticexpialidocious"
target="main">Some Page</a>

And for more params:
<a href="foo.cgi?param1=value1&param2=value2&param3=value3" etc.>
 
R

Roland Messerschmidt

Hi,

Will posted just a few minutes before I wanted to do it... ;-)

Adrienne said:
<a href="somepage.php?text=Supercalifragilisticexpialidocious"
target="main">Some Page</a>

I tested this with a tiny page:
<html>
<body>
<?php echo "display parameter: " . $abc; ?>
</body>
</html>

Result of calling test.php?abc="xy" is only an error msg:
"Notice: Undefined variable: abc in test.php on line 3"

Is there a way to define a variable without assigning a value? Maybe
somewhere in the header?

Any hint?

TIA


Roland
 
M

Michael Wilcox

I tested this with a tiny page:
<html>
<body>
<?php echo "display parameter: " . $abc; ?>
</body>
</html>
Is there a way to define a variable without assigning a value?

Using PHP, this variable is actually accessed as $_GET['text']
(substitute text for the appropriate name from the URL).
 
R

Roland Messerschmidt

Hi,

Michael Wilcox said:
Using PHP, this variable is actually accessed as $_GET['text']

Thank's a lot, now it works as I want!
On the other hand today I realized, that the ISP hosting the site
doesn't speak PHP...

:-( or :), choose yourself!


Roland
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top