Here is what i want to be able to do in PHP if its even possible :) -
Read the value written in a prompt box and then echo it onto the page...
(and please answer the question aboove)
Printable View
Here is what i want to be able to do in PHP if its even possible :) -
Read the value written in a prompt box and then echo it onto the page...
(and please answer the question aboove)
No. Thats what PHP is for.
PHP stands for Pre-client Hypertext Processor. As in, your web browser never sees the PHP code.
if you looked in your source, all you would see is this...
You would need ajax to send the data to a php script, then put the result somewhere on your page.Code:<button onclick="asd()">Test</button>
<script>
function asd() {
You fool !
}
</script>
Yeah... I forgot about the parsing part of PHP. But I still don't understand the whole running PHP when its needed part - for an example say I wanted to click a button and make the time from PHP show up - how would that be done ?
(I know that PHP does not connect with DOM but there should be a way to respond to things the user does - what can you really do with PHP apart from opening files closing them writing to them reading them ?)
Well is there anything else ???
Ok i was on the web and found this password script -
<form method="POST" action="example18.php3">
<div align="left"><p><font face="BankGothic Md BT">Admin password?</font>
<input type="password" name="pw" size="14"><input type="submit" value="Submit"></p>
</div></form>
How is this php script connecting to that -
<?
$adminpass = "test123";
if ($pw == $adminpass)
{
print("Welcome to the administration area!");
}
else
{
print("Wrong password");
}
?>
I wonder :)
im sure if you set a cookie you would be safer, that way you can check the cookie for the correct username and password
You misunderstand :), what i needed to know is how this works but now understand most of it and now instead need to know that if only one submit button is allowed in a form (then it would make sense to me on how the whole thing works)