You can't have extensions to a filename from the action attribute, period.  You have 
to either use defined input fields, or hidden fields to pass value from one page to 

And just as FYI, you don't need to use the printf() function in your situation, as 
it's best used when you need strict formatting for output, as in the case of using 
currency amounts, or other situations where decimal places are needed.

The easier way to write it would be simply:

echo "<form method=\"post\" actoin=\"name.php\">";
echo "<input type=\"hidden\" name=\"lastname\" value=\"$lastname\">";



>>> Steve Cayford <[EMAIL PROTECTED]> 06/24/02 04:11PM >>>

On Monday, June 24, 2002, at 01:52  PM, Matthew Crouch wrote:

> this bit from my index page is giving me 2 headaches:
> 1. it isn't passing anything into the URL
> 2. the page that gets called ("name.php") sits and tries to load
> forever. it looks like it's even filling up my hard drive with data (?!)
> Note: it does this (#2) even if I type in the URL with a variable and
> value, like "name.php?lastname=smith"
> <?
> printf ("<form method=\"post\" action=\"name.php?lastname=%s\">",
> $lastname);
> ?>
>     <div align="center">
>       <input type="Text" name="lastname" size="75">
>       <input type="Submit" name="submit" value="Search for Last Name">
>     </div>
>   </form>
> </div>

Can you do a "get" and a "post" at the same time? Tacking the lastname 
onto the url as in "action=\"name.php?lastname=%s\"" is using a get 
method, but your form is supposed to set lastname using the post method. 
Is there some reason you want your script to set one version of lastname 
and let the user type in a different version of lastname? If so try 
using the post method with an <input type="hidden" name="otherlastname" 


> --
> PHP Database Mailing List (
> To unsubscribe, visit: 

PHP Database Mailing List (
To unsubscribe, visit: 

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to