On Mon, 2003-09-15 at 15:29, Daniel Szasz wrote:
> Hello
>
> What is wrong with this code ?
>
> $doWork = $_GET[doWork];
This is sloppy, put the quotes around the key string "doWork".
> echo $doWork;
> echo ( "<BR>");
> if ( $doWork = 0) {
You just assigned 0 to $doWork, try using 0 == $doWork
> exit;
> }
> else
> {
> if ( $doWork = 1) {
Once again, assignment when comparison is probably intended.
> ?>
> <input class=no type="button" value="Accept" onClick="doAccept();">
> <input class=no type="button" value="Reject" onClick="doReject();">
> <?
> };
> if ( $doWork = 2) {
Yet again with the assignment.
> echo ( "call request accepted");
> };
> if ( $doWork = "3") {
Another assignment, but now it's a string, not even any consistency.
> echo ( "call request rejected");
> }
> }
>
> I still got in the page the 2 buttons and the 2 echo's from doWork = 2 and
> doWork = 3.
Looks like you're a coding slob IMHO.
Rob.
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php