Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | This is going to be really easy (php)

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion

This is going to be really easy (php)
Closed Thread
 
Thread Tools
Old 28-05-2004, 15:57   #1
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
This is going to be really easy (php)

Just not for me, I've done it before, but I can't remember how, basically I have a form, with say 1 text field, I want that field populated by whatever is suffixed on the URL, e.g.

http://www.blah.com/test.php?price=12345

Then, the form field should populate with 12345.

Simple eh? Just not for a plank like me, any help is as always appreciated.

Thanks.
Bifta is offline  
Advertisement
Old 28-05-2004, 16:01   #2
Nemesis
Inactive
 
Join Date: Jun 2003
Location: Surrey
Age: 59
Services: Virgin stuff
Posts: 6,407
Nemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny star
Nemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny star
Send a message via MSN to Nemesis
Re: This is going to be really easy (php)

Richard will be along any second
Nemesis is offline  
Old 28-05-2004, 16:06   #3
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: This is going to be really easy (php)

Ah, I've fixed it

it was echo $whatever

Someone can close this now
Bifta is offline  
Old 28-05-2004, 16:18   #4
Steve H
Inactive
 
Join Date: Jun 2003
Location: Stoke-On-Heaven
Age: 40
Services: Freeview, 512k Pipex.
Posts: 1,758
Steve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of QuadsSteve H has a fine set of Quads
Send a message via ICQ to Steve H Send a message via MSN to Steve H Send a message via Yahoo to Steve H
Re: This is going to be really easy (php)

As you say
Steve H is offline  
Old 28-05-2004, 20:10   #5
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: This is going to be really easy (php)

OK I'm bending the rules a little here but I'll just add that echo $something will work only if you have globals on.

The more usual (and secure) way is to use the following:
PHP Code:
<?php
/*
Let's say we have an URL like http://www.domain.com/index.php?something=value
To get this we need to use the HTTP GET array like so:
*/

$something = $_GET['something'];
echo 
$something;

// Or POST (if preceded by a method="post" in the HTML form tag)

$something = $_POST['something'];
echo 
$something;
?>
I'd do something like:
PHP Code:
<?php
$price 
= $_GET['price'];
echo 
"<input type=\"text\" name=\"price\" value=\"$price\" />";
?>
Richard M is offline  
Closed Thread

Thread Tools

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

Forum Jump


All times are GMT. The time now is 11:47.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum