How can I verify what is posted from an html page to another php page

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default How can I verify what is posted from an html page to another php page

    I have an html + javascript page which contains a form used to collect and
    send data like this:

    <quote>

    <form name="formlist" action="proposemove.php" method="post">
    <table align=center width=280>
    <script>
    ......
    .....
    document.write('<td width=60 align=center>');
    document.write('<input type="text" name="movewhite[');
    document.write(i);
    document.write(']" size=5 style="height:21px"></td>');
    document.write('<td width=60 align=center>');
    document.write('<input type="text" name="moveblack[');
    document.write(i);
    .....
    ....
    </script>

    </quote>

    In propose move.php I do :

    <quote>

    $movewhite=$_POST["movewhite"];
    $moveblack=$_POST["moveblack"];
    print ("<p> movewhite: ");
    print_r($movewhite);
    print ("<p> moveblack: ");
    print_r($moveblack);

    </quote>

    to see the content of the arrays movewhite and moveblack and I get
    displayed:

    <quote>
    movewhite: Array ( [0] => )
    moveblack: Array ( [0] => )
    </quote>


    How could I verify what is really sent from my HTML pqge to my php page?


    Michel Guest

  2. Similar Questions and Discussions

    1. #40472 [NEW]: Semi random characters posted along with page content
      From: fuitad at gmail dot com Operating system: FreeBSD PHP version: 5.2.1 PHP Bug Type: Output Control Bug description: ...
    2. Load HTML page within my Flash web page
      Sorry if this has been asked before. New to the Forum. Is it possible to load an html page ( "eBay" for example ) in my flash web page. Still have...
    3. how to jump from html page to html page
      Good Evening, I would like to know the way to jump from webpage to webpage, without the user pressing anything. For example, if the user...
    4. I saved a html page as a PHP page but I have problems
      Hello Robert, How are you testing your pages? You need to test dynamic pages (such as PHP pages) using both a Web Server and an Application...
    5. Calling a html page from an asp page then returning to the next statement on the original asp page
      Hi! I have an ASP page that calls excel to create a report. This works fine. Now I need to call a html calendar page to filter what rows are...
  3. #2

    Default Re: How can I verify what is posted from an html page to another php page

    Don't understand why but this was not posted ! Could someone give ideas
    please...
    "Michel" <MicheldeVathaire@wanadoo.fr> a écrit dans le message de news:...
    > I have an html + javascript page which contains a form used to collect and
    > send data like this:
    >
    > <quote>
    >
    > <form name="formlist" action="proposemove.php" method="post">
    > <table align=center width=280>
    > <script>
    > .....
    > ....
    > document.write('<td width=60 align=center>');
    > document.write('<input type="text" name="movewhite[');
    > document.write(i);
    > document.write(']" size=5 style="height:21px"></td>');
    > document.write('<td width=60 align=center>');
    > document.write('<input type="text" name="moveblack[');
    > document.write(i);
    > ....
    > ...
    > </script>
    >
    > </quote>
    >
    > In propose move.php I do :
    >
    > <quote>
    >
    > $movewhite=$_POST["movewhite"];
    > $moveblack=$_POST["moveblack"];
    > print ("<p> movewhite: ");
    > print_r($movewhite);
    > print ("<p> moveblack: ");
    > print_r($moveblack);
    >
    > </quote>
    >
    > to see the content of the arrays movewhite and moveblack and I get
    > displayed:
    >
    > <quote>
    > movewhite: Array ( [0] => )
    > moveblack: Array ( [0] => )
    > </quote>
    >
    >
    > How could I verify what is really sent from my HTML pqge to my php page?
    >
    >

    Michel Guest

  4. #3

    Default Re: How can I verify what is posted from an html page to anotherphp page

    Michel wrote:
    >>In propose move.php I do :
    >>
    >><quote>
    >>
    >>$movewhite=$_POST["movewhite"];
    >>$moveblack=$_POST["moveblack"];
    >>print ("<p> movewhite: ");
    >>print_r($movewhite);
    >>print ("<p> moveblack: ");
    >>print_r($moveblack);
    >>
    >></quote>
    >>
    >>to see the content of the arrays movewhite and moveblack and I get
    >>displayed:
    >>
    >><quote>
    >>movewhite: Array ( [0] => )
    >>moveblack: Array ( [0] => )
    >></quote>
    >>
    >>
    >>How could I verify what is really sent from my HTML pqge to my php page?
    I don't know if I understand your question. I didn't see the relevance
    of the JavaScript to the question. (Note: JavaScript is the tool of the
    Devil.) It looks like you're having trouble seeing inside a variable
    that has decided it is an array, though, so try this:

    foreach($movewhite as $key => $value)
    {
    echo "<p>\$movewhite[$key] points to $value</p>";
    }

    foreach($moveblack as $key => $value)
    {
    echo "<p>\$moveblack[$key] points to $value</p>";
    }

    If they are arrays and they contain something, this should reveal what.
    However, the message you are getting ([0] => ) seems to suggest that the
    array is empty. Why, I don't know. As I say, I despise JavaScript. Tool
    of the Devil. Ruiner of websites and inter-browser compatibility. So
    many expensive, corporate, professional sites that only work in one
    browser or another (usually only tested in the loathsome IE6). I don't
    like the proprietary nature of Flash, but at least it works. (Not with
    PHP, though, I dare say.)
    --
    Bob
    London, UK
    echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk"
    Robert Downes Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139