Log in

View Full Version : Simple problem with code.



Hyperactive
08-10-2007, 01:26 PM
<html>

<head>

<title>Testing</title>

</head>

<body>

<form method="get" action="" target="testing">

Name: <input type="text" name="test">
<input type=submit>
</form>

<iframe name="testing" src="http://www.thisistest.com/test/<?php echo $_GET['test'];?>" </iframe>

</body>

</html>

My question is, what i have do with this
action=""
to get code working? ? Thank you if you help me, and sorry my bad english. ;)

jscheuer1
08-10-2007, 02:29 PM
It depends upon how you have things setup, if test's value is a page:


action="#"

could work, but at that point, you should get rid of:


target="testing"

There may be problems with escaping/unescaping the page name, though generally I think that the browser and server will do that for you. I could be wrong about that last part.

jc_gmk
08-10-2007, 02:30 PM
Thats where you tell it where to send the data!

e.g.


action="process.php"

or


action="<?php print $_SERVER['PHP_SELF']; ?>"
if your sending it back to the same page