473,749 Members | 2,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing variables values using POST

54 New Member
i am presently passing the value of a variable to a php file using GET after data has been inserted to the database.

ex=

$firstname = $_POST["firstname"];

if(!$sqlconnect ion)
{
echo "error message";
}
else
{
header("Locatio n: thankyou.php?fi rstnameis=$firs tname");
}

how can i send the value of $firstname using POST instead of GET as the value is presently appearing in the address bar. ideally i would like using POST.

NOTE = please suggest techniques that does NOT involve javascript in order to pass $firstname using POST method, as i have done the entire validations using php and i have assumed that user has javascript turned off.

please advice.

thanks.
Mar 17 '08 #1
2 1628
TheServant
1,168 Recognized Expert Top Contributor
Can you post your form. Why can't you just use method="POST" in your form submission?
Mar 17 '08 #2
rpnew
188 New Member
i am presently passing the value of a variable to a php file using GET after data has been inserted to the database.

ex=

$firstname = $_POST["firstname"];

if(!$sqlconnect ion)
{
echo "error message";
}
else
{
header("Locatio n: thankyou.php?fi rstnameis=$firs tname");
}

how can i send the value of $firstname using POST instead of GET as the value is presently appearing in the address bar. ideally i would like using POST.

NOTE = please suggest techniques that does NOT involve javascript in order to pass $firstname using POST method, as i have done the entire validations using php and i have assumed that user has javascript turned off.

please advice.

thanks.
Hi,
As "The Servant" said use 'method=POST' and if you still have any problem. Post your code of the form here so that we can help you better..

Regards,
RP
Mar 17 '08 #3

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

Similar topics

5
5103
by: TG | last post by:
Conditions: Register globals is set to on. Parse html as php is set to on. I have two forms OrderTest1 and OrderTest2 and need to be able to validate the data from OrderTest1 before passing to OrderTest2. The first block of code below is the first form. This form calls itself and does perform the validations correctly as I want. However, once the header redirect to OrderTest2.htm is performed after the isset($POST)) evaluates as true...
14
3150
by: Antoni | last post by:
Hello, I wondered if anyone could offer some guidance over my php script. I was hoping the example would allow the user to click the submit buttons and the item number increment. And when the user clicks, the my basket icon the items.php scripts starts and the variables from the current script are passed to this. I tried to display the variables as the items are incremented, though
3
14946
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
20
4849
by: Glenn Venzke | last post by:
I'm writing a class with a method that will accept 1 of 3 items listed in an enum. Is it possible to pass the item name without the enum name in your calling statement? EXAMPLE: public enum EnumName FirstValue = 1 SecondValue = 2 ThirdValue = 3
5
6698
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage & "<br>"%> Exp <%'Response.Write GrantID & "<br>"%>
6
3255
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A query-string flag is used to indicate to the page whether it should instantiate a new instance of the object or access an existing instance from the calling page. On the both pages I have a property of the page which is an instance of this custom...
28
3127
by: Skeets | last post by:
i'm passing session and hidden variables between pages. not to mention post values. i'm a little concerned that someone with sufficient knowledge could spoof these vlaues and manipulate the program. is this a valid concern? i'm thinking i can check the submitting page setting up something around the following the following code... $base_name = basename($_SERVER);
12
2683
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
2
8111
by: Aaron | last post by:
I'm trying to pull data from a website and read it into a file the I can parse. I've done the before to site without post variables but I can seem to get my statments to work with the post. Can someone help me out? below is the code I have so far. Thank in advance... $url="www.somesitethatneedspostvariables.com"; $postdata = http_build_query( array( 'postvarname1' ='value1',
0
9389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.