Page 1 of 1

$_Get

Posted: Mon Oct 06, 2008 8:37 am
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 ?

Re: $_Get

Posted: Mon Oct 06, 2008 8:40 am
by papa
Do you have </form> in ADM.php?

And you don't have to use </input>. Instead: <input type="submit" name="bla" />

Re: $_Get

Posted: Mon Oct 06, 2008 8:43 am
by Shadowizoo
Yes I'm closing my form via </form>

Re: $_Get

Posted: Mon Oct 06, 2008 8:50 am
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>
 

Re: $_Get

Posted: Mon Oct 06, 2008 8:58 am
by onion2k
Use urlencode()

Re: $_Get

Posted: Mon Oct 06, 2008 10:07 am
by Shadowizoo
Ok i got it !!

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