Go Back   Computer Forums > Web Design | Website Development > Web Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 02-08-2008, 12:19 PM   #1
Baseband Member
Join Date: Aug 2007
Posts: 40
Exclamation Sending Data to a PHP Page

I want to know, how can I (if it is possible) send data through a web request to a php page. For instance, when I connect to my php page, how can I pass a letter or number, and let the page recive and store it?

Please let me know,

qah661 is offline   Reply With Quote
Old 02-08-2008, 10:26 PM   #2
Solid State Member
RAZ0R's Avatar
Join Date: Jan 2008
Posts: 13
Default Re: Sending Data to a PHP Page

if its form data then all you would need is $_REQUEST['VarName']; on the php page to get that data, to store it use sessions, cookies or a database.

RAZ0R is offline   Reply With Quote
Old 02-10-2008, 04:35 PM   #3
Site Team
David Lindon's Avatar
Join Date: Dec 2002
Posts: 15,233
Default Re: Sending Data to a PHP Page

You can pass it via the query string ?var=value

Is that what you meant?
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 02-24-2008, 02:35 AM   #4
In Runtime
McTrAyN's Avatar
Join Date: Nov 2007
Posts: 221
Default Re: Sending Data to a PHP Page

You could do:

and retrieve it by:
PHP Code:
If that's what your trying to do.. Or you could you a POST and access it by:
PHP Code:
I would reccomend the first option and would probably replace the trim with a custom security function e.g.:
PHP Code:
function secure($var) {
$var == '') {
'Hmm... Var is empty!';
} else {
$var mysql_real_escape_string($var);
I wouldn't do what RAZOR said becuase request is POST and GET and that could open the website up to hackers if not secured tightly.
PC: 2.2Ghz AMD 64 X2 4600+
2GB Corsair Ram
160GB WD Hard Drive
"If your going to skate on thin ice, don't be surprised when you fall through!"
McTrAyN is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off

All times are GMT -5. The time now is 01:11 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0