Web Design and Development Forums

passing variables values using POST

This is a discussion on "passing variables values using POST" within the HTML Forum section. This forum, and the thread "passing variables values using POST are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > HTML Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Mar 16th, 2008, 23:26   #1 (permalink)
Junior Member
 
Join Date: Dec 2007
Location: auckland
Age: 33
Posts: 10
passing variables values using POST

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

ex=

PHP: Select all

$firstname $_POST["firstname"];

if(!
$sqlconnection)
{
echo 
"error message";
}
else
{
header("Location: thankyou.php?firstnameis=$firstname"); 

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.

Last edited by CloudedVision; Mar 17th, 2008 at 01:50. Reason: PHP tags, please
sudhakararaog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 17th, 2008, 01:49   #2 (permalink)
Nerdy Moderator
 
CloudedVision's Avatar
 
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 517
Blog Entries: 4
Re: passing variables values using POST

Moved to HTML forum

This is quite simple. Insert method="POST" into your forum tag. e.g.:

HTML: Select all
<form action="submit.php" method="POST">
bla
</form>
__________________
Take it easy

Other Road Design

WebForumz Moderator: HTML | Javascript | PHP
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 18th, 2008, 08:12   #3 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: passing variables values using POST

Quote:
Why use $_POST?
  • Variables sent with HTTP POST are not shown in the URL
  • Variables have no length limit
However, because the variables are not displayed in the URL, it is not possible to bookmark the page.
To get a better understanding about this, you can go to w3school website to learn almost everything about basic php

Tutorial: PHP Post

Hope that's helpful to you.
Cheers...
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing variables from PHP to Flash tox0tes Flash & Multimedia Forum 4 Dec 29th, 2007 06:46
Passing variables from Flash to PHP LostProphet Flash & Multimedia Forum 6 Aug 31st, 2006 14:05
Passing values from Datagrid to another form caryma ASP.NET Forum 4 Aug 17th, 2005 08:06
passing post variables benbacardi PHP Forum 5 Jul 5th, 2005 22:13
PLEASE HELP - Passing Variables in Querystring just_the_basix ASP Forum 40 Sep 3rd, 2004 10:46



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 10:55.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59