Hi!
I got this here:
<? $catego="test"; ?> <form action="http://www.mysite.nl/printvars.php?keyword=".$keyword."&catego=".$catego." method=get"> <input type="text" name="keyword"> </form>
printvars.php prints $keyword correctly, but doesn't print $catego!
Is it because it wasn't chosen in the form, coz only name='keyword' is defined?
I need it because when people enter a certain part of a site, 1 variable should be set ($catego), and the other should be variable ($keyword).
Any idea?
thefisherman
Hmm, usually I don't use GET in combination with a form. GET is for url's...so,
<a href="http://www.mysite.nl/printvars.php?keyword=$keyword&catego=$catego">Click here!</a>
is what I'd be trying...
HTH,
The problem here is that you've escaped to HTML. You cannot use PHP variables while working in HTML mode.
Try this:
<a href="http://www.mysite.nl/printvars.php?keyword=<?php echo $keyword; ?>&catego=<?php echo $catego; ?>">Click here!</a>
OR
<?php echo "<a href=\"http://www.mysite.nl/printvars.php?keyword=" . $keyword . "&catego=" . $catego . "\">Click here!</a>"; ?>
Well, that'd be a problem; but it's not the one he had...
B-sidez, I had some real big php delim's hanging there, along w/ a nice echo and some cool quotes, even a ; --- I just didn't post 'em ... 😃 😃