Ask a Question related to PHP Development, Design and Development.
-
Michel #1
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
-
#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: ... -
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... -
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... -
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... -
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... -
Michel #2
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
-
Robert Downes #3
Re: How can I verify what is posted from an html page to anotherphp page
Michel wrote:
I don't know if I understand your question. I didn't see the relevance>>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?
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



Reply With Quote

