?
Solved

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

Posted on 2003-03-18
6
Medium Priority
?
245 Views
Last Modified: 2006-11-17
how do i make form send it contents to itself and execute a script in the page?
0
Comment
Question by:foran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:bartonjo2
ID: 8158190
<form name="form1" method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
0
 
LVL 6

Expert Comment

by:carchitect
ID: 8158320
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>



0
 
LVL 3

Expert Comment

by:bartonjo2
ID: 8159491
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
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
bartonjo2 earned 450 total points
ID: 8159505
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
0
 

Author Comment

by:foran
ID: 8160464
Hola Carcitecht, I need a fast simple solution requiring a minumum amount of work on my part.
0
 

Author Comment

by:foran
ID: 8160468
thanks bartonjo2 simple and effective
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question