SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast bobbobbobbob's Avatar
    Join Date
    Apr 2004
    Location
    bobbobbobbob
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating php files with php?

    Hey

    I want to create a php file in one of my directories with content on it is changed when a user enters certain information through a form. Any idea how do do this?

    Ah, and one more question.

    PHP Code:
    echo"<INPUT TYPE=\"submit\" name=\"sub".$id."\" value=\"Change\">"
    I have this in a while loop that creates a button to present the option to change all of the things that are shown. How would I run the check to see if they clicked with the variable in teh name?

    I have
    PHP Code:
    if(isset($_POST["sub".$id.""])){ 
    but it isn't working out.

    Thanks

  2. #2
    SitePoint Enthusiast bobbobbobbob's Avatar
    Join Date
    Apr 2004
    Location
    bobbobbobbob
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hate to sound desperate...but can someone please help me?

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <?
    $keyname
    ="sub".$id;

    if(isset(
    $_POST[$keyname])){
    //..
    ?>
    OOP Addict - sorry for my english

  4. #4
    SitePoint Enthusiast bobbobbobbob's Avatar
    Join Date
    Apr 2004
    Location
    bobbobbobbob
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I'll try it out.


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
  •