$_Get

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shadowizoo
Forum Newbie
Posts: 3
Joined: Mon Oct 06, 2008 8:27 am

$_Get

Post by Shadowizoo »

Hi guys! Here's my problem.

I got a file named ADM.php and i use a form like this:
print "<form method='GET' action='Modify.php'>";
print "<input type='submit' name='Add' value='+/-'></input>";
print "<input type='hidden' name='Modify' value=".$Question['QuestionName']."></input>";

$Question['QuestionName'] shows at screen: 'This is a test'


I got an other file (Modify.php) where I'd like to get "This is a test" by $_GET. The problem is that I only get 1 word which is "This". Can someone help me please ?
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: $_Get

Post by papa »

Do you have </form> in ADM.php?

And you don't have to use </input>. Instead: <input type="submit" name="bla" />
Shadowizoo
Forum Newbie
Posts: 3
Joined: Mon Oct 06, 2008 8:27 am

Re: $_Get

Post by Shadowizoo »

Yes I'm closing my form via </form>
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: $_Get

Post by papa »

My test worked so don't know what might be wrong...

Code: Select all

<html>
 
<head>
<title>Modify.php</title>
</head>
<body>
<?php echo $_GET['Modify']; ?>
</body>
</html>
 
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: $_Get

Post by onion2k »

Use urlencode()
Shadowizoo
Forum Newbie
Posts: 3
Joined: Mon Oct 06, 2008 8:27 am

Re: $_Get

Post by Shadowizoo »

Ok i got it !!

I typed value=".$Question['NomQuestion']." instead of value='".$Question['NomQuestion']."'
Post Reply