SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2006
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html form action with php function ?

    is it possible to put the phpfunction in my html forms action type like below:

    HTML Code:
    form action="<?php function_name(); ?> "

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for what? well you can create a function outside the action value.. then call the return value..

  3. #3
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    assuming that your function is actually going to echo something, otherwise you would have to <?php echo function_name(); ?>

    I can't really see why this would be necessary, the form action directs the page to a processing script where you might have functions, I don't see how or why you could do it any other way.
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  4. #4
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by surajbgl View Post
    is it possible to put the phpfunction in my html forms action type like below:

    HTML Code:
    form action="<?php function_name(); ?> "
    You are about to post the form data to function, that is not possible at all as far as i know.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Like this I guess ...
    PHP Code:
    function boomerang(){
    echo 
    $_SERVER['PHP_SELF'];


  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2006
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks guys, i have made a different file for the actions otherwise it's not woking.

    thanks again


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
  •