Link to home
Start Free TrialLog in
Avatar of foran
foran

asked on

how do i make form send it contents to itself and execute a script in the page?

how do i make form send it contents to itself and execute a script in the page?
Avatar of Josh Barton
Josh Barton
Flag of United States of America image

<form name="form1" method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
Avatar of carchitect
carchitect

o yes
no prob
ok try this


<?
if(isset($_POST['myname']))
  echo $_POST['myname'];
?>


filename.php
----------------------

<html>
<body>
<form action="filename.php" method=post>
<input type=text name=myname>
<input type=submit>
</form>
</body>
</html>



hey carcitecht dont you think your cutting the chase, to make page send variables to itself it requires far less work to use PHP_SELF
ASKER CERTIFIED SOLUTION
Avatar of Josh Barton
Josh Barton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of foran

ASKER

Hola Carcitecht, I need a fast simple solution requiring a minumum amount of work on my part.
Avatar of foran

ASKER

thanks bartonjo2 simple and effective