473,241 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Add a parameter to php call

Hi,
I've a form that call a PHP file using the POST method , how can I pass a
new parameter to PHP .
thanks.
Jul 17 '05 #1
4 14224
toufik toufik wrote:
Hi,
I've a form that call a PHP file using the POST method , how can I pass a
new parameter to PHP .
thanks.


Add a field to the form?

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #2
Thanks,
is it the only way that we have? because I have differents info in
differents pages, And I prefer not to add fields to the form.

"Justin Koivisto" <sp**@koivi.com> wrote in message
news:OA****************@news7.onvoy.net...
toufik toufik wrote:
Hi,
I've a form that call a PHP file using the POST method , how can I pass a new parameter to PHP .
thanks.


Add a field to the form?

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #3
toufik toufik wrote:
"Justin Koivisto" <sp**@koivi.com> wrote in message
news:OA****************@news7.onvoy.net...
toufik toufik wrote:
Hi,
I've a form that call a PHP file using the POST method , how can I pass a
new parameter to PHP .
thanks.


Add a field to the form?

Thanks,
is it the only way that we have? because I have differents info in
differents pages, And I prefer not to add fields to the form.


You could prase the _POST array at the beginning of the script and look
for a field that tells what script submitted the form and process from
there... Just add something to each form like:
<input type="hidden" name="referer" value="<?php echo
$_SERVER['PHP_SELF'] ?>">

Then take your action based on the $_POST['referer'] field value.

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #4
You can introduce a new value to PHP, via the post with <input
type="hidden" name="anewvariable" value="somethingvaluable"> in between
your <form> and </form> tags. The php file then called via the submit/post
has that variable available to it.

Daniel

"toufik toufik" <to*****@sympatico.ca> wrote in news:7scNb.1261$c1.233022
@news20.bellglobal.com:
Hi,
I've a form that call a PHP file using the POST method , how can I pass a
new parameter to PHP .
thanks.


Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dan | last post by:
I've run into an interesting problem, and seemed to have stumped 3 newsgroups and 2 other forums. For some reason when I try to insert a record into a SQL table that has a Text column, the...
3
by: Douwe | last post by:
I try to build my own version of printf which just passes all arguments to the original printf. As long as I keep it with the single argument version everything is fine. But their is also a version...
3
by: z_learning_tester | last post by:
Hello, I'm studying parameter arrays now and see what looks like a contradiction in my book. First it says that to pass any number of say object types to a method you say: int myMethod (params...
1
by: Vaelek | last post by:
Hello, I'm somewhat new to DB programming and have a question. I am now taking over an application that a previous programmer had written and he had made use of the Parameter.Add function for DB2...
4
by: Ranginald | last post by:
Hi, I'm having trouble passing a parameter from my default.aspx page to my default2.aspx page. I have values from a query in a list box and the goal is to pass the "catID" from default.aspx...
1
by: NorrYtt | last post by:
I am having a problem with passing a function as a parameter to my DLL so it can call it back with updates. The DLL is written in LabWindows CVI with some #ifdef 'C'-style wrappings. The...
0
by: Sivajee Akula | last post by:
Hello All, I am trying to consume a .NET Service from Adobe LiveCycle Workflow. The service deals with complex objects. I am getting the following exception at the time of invocation of the...
11
by: wuzertheloser | last post by:
Write a program which calculates the integral of the function f(x)=(A*x^m)/n! on the interval from a to b (0<a<b). In the main program, scanf a double value for m and a...
4
by: =?Utf-8?B?UHVjY2E=?= | last post by:
The function that I'm trying to call through DLLImport has a parameter that has a C code's vector's Itrator to a structure. I Have marshalled the structure in C# but how do I do the C type...
7
by: jamesclose | last post by:
My problem is this (apologies if this is a little long ... hang in there): I can define a function in VB.NET with optional parameters that wraps a SQL procedure: Sub Test(Optional ByVal Arg1...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.