For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > February 2005 > Passing arguments?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Passing arguments?
Rory

2005-02-19, 3:55 pm

I was wondering if anyone can help me with the following problem. I have
a html form that sends data to a script. Is there any way I can pass
arguments to the script from within the post method? For example

<form method="post" action="index.php arg1">

And if so how can I access that argument in my PHP script?

Cheers,
Rory.
Andy Hassall

2005-02-19, 3:55 pm

On Sat, 19 Feb 2005 15:10:40 +0000, Rory <rorywalsh@ear.ie> wrote:

>I was wondering if anyone can help me with the following problem. I have
>a html form that sends data to a script. Is there any way I can pass
>arguments to the script from within the post method? For example
>
><form method="post" action="index.php arg1">


Use hidden fields.

<input type="hidden" name="arg1" value="whatever">

>And if so how can I access that argument in my PHP script?


$_POST['arg1'].

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Rory

2005-02-19, 3:55 pm

Cheers, that did the trick!


Andy Hassall wrote:
> On Sat, 19 Feb 2005 15:10:40 +0000, Rory <rorywalsh@ear.ie> wrote:
>
>
>
>
> Use hidden fields.
>
> <input type="hidden" name="arg1" value="whatever">
>
>
>
> $_POST['arg1'].
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com