s.mujahid8 s.mujahid8 - 1 year ago 67
PHP Question

Command in PHP equivalent to alert in javascript

I use the 'alert' command in javascript's to check values of variables so as to debug my code. but i cant find any such command in PHP which shows a simple popup box like the alert command. im new to PHP.

is there something i dont know?



Here i just want to find out what values are coming in those variables. if it was javascript, i would simply use alert (username) and alert (password). how to do it in php?
thank you.

Answer Source

Just echo them

echo "Username:".$username;
echo "<br>";
echo "Password:".$password;

You can also use var_dump

PHP is a server side language and does not provide client side functionality like JavaScript alert()

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download