SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast cilverphox's Avatar
    Join Date
    Jan 2005
    Location
    Petoskey, MI
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry this is drving me crazy...I don't understand

    ok, this thread is a continuation of the one I posted last night..
    http://www.sitepoint.com/forums/show...ght=cilverphox

    I've determined that the variables from the <form> are filled with the data I entered. However, when the form action calls upon itself (<form action="admin.php?action=13">), the script fails to execute the php code. Instead, only the html code at the bottom of the page is executed.

    this is seriously driving me scray as this program is being written "professionally" (albeit my first script) and this problem is a major roadblock in this project . If someone could PLEASE help me out on this. I thank those who have already tried only to come up empty handed.

    one may test the script at php.cilverphox.com (user: Admin, pass: Admin).
    click "Manage Customers" and notice the phrase "php code." This verifies that the php code is being executed. Click "Add Customer" and enter any data you'd like (again, notice "php code"). Submit the form as it will return you to the administrative menu. Notice that "php code" is no longer printed on the screen. What, in my code, would prevent the php code of admin.php from being executed? Sure my question may seem a little vague, yet the more I think about it, the more I'd like to throw my box out the window...god forbid

    Thanks to all the help
    -cilverphox

  2. #2
    &lt;!-- Insert thoughts here --&gt; pitcher17's Avatar
    Join Date
    Apr 2004
    Location
    The great white north
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you add
    PHP Code:
    echo '<pre>';
    print_r($_POST);
    echo 
    '</pre>'
    to the top of your page and change the method in your form from GET to POST?
    The more time I save by not planning and documenting,
    the more time I have left to debug.


  3. #3
    &lt;!-- Insert thoughts here --&gt; pitcher17's Avatar
    Join Date
    Apr 2004
    Location
    The great white north
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To test and see exactly what you are getting back from your form you could try this.
    PHP Code:
    foreach($_GET as $key => $val){
         echo 
    $key " => " $val "<br/>";
    }
    foreach(
    $_POST as $key => $val){
         echo 
    $key " => " $val "<br/>";

    This way you will see on the screen all of your GET and POST variables and you should be able to figure out what is going on.

    HTH
    The more time I save by not planning and documenting,
    the more time I have left to debug.


  4. #4
    SitePoint Enthusiast cilverphox's Avatar
    Join Date
    Jan 2005
    Location
    Petoskey, MI
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion. I have tried that code previous and it merely indicated what the values of the form variables are. This, however, is not the problem. The problem is that the code will not execute once it calls itself.

    Ya know, now that I think about, it probably has nothing to do with the form variables. This has happened to me before in Qbasic. What I believed was causing the problem, wasn't actually causing it at all. Perhaps it's something completely different....and simple....

    Back to the grind stone..

    thanks anyway

    # cilverphox

  5. #5
    &lt;!-- Insert thoughts here --&gt; pitcher17's Avatar
    Join Date
    Apr 2004
    Location
    The great white north
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to post or send me the code I'll have a look at it.....

    a fresh set of eyes and all that....
    The more time I save by not planning and documenting,
    the more time I have left to debug.



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
  •