Results 1 to 3 of 3

Thread: Simple problem with code.

  1. #1
    Join Date
    Jul 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Simple problem with code.

    PHP Code:
    <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
    PHP Code:
    action="" 
    to get code working? ? Thank you if you help me, and sorry my bad english.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It depends upon how you have things setup, if test's value is a page:

    Code:
    action="#"
    could work, but at that point, you should get rid of:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2007
    Location
    England, UK
    Posts
    235
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default

    Thats where you tell it where to send the data!

    e.g.

    HTML Code:
    action="process.php"
    or

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •