473,408 Members | 2,427 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,408 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 14230
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.