Want this question answered?
To submit a file, you don't even need a PHP file. The PHP portion is for processing the form results. You just make a button and make sure you defined the action URL.Name: Gender:Boy: Girl:
That question doesn't make much sense...delete for what?
A simple function call <html> <body> <?php if(isset($_POST['button'])) { setValue(); // Function is called } function setValue() { echo "<br>The button property to call PHP function works"; // Your code here } ?> <input type="submit" name="button" onclick=<?php $_SERVER['PHP_SELF']; ?> /> </body> </head>
You should use php form for it. -EDIT From the above numpty- <? $button = $_POST['button']; $textfield = $_POST['textfield']; if($button && $textfield){ echo $textfield; // This will output "Hello" as the initial value of the textfield was "Hello" } ?> <html> <body> <form name="form1" method="post" action=""> <input name="textfield" type="text" id="textfield" value="Hello"> <input type="submit" name="button" id="button" value="Submit"> </form> </body> </html>
A PHP file will not be a video. Videos are commonly .wmv, .mov, .mp4, etc. PHP is a server scripting programming language. Since a PHP file is completely parsed on the server, you cannot download a PHP file, unless you use another script to enforce the download. But even that approach requires that the script be on the same server as the target one.
You need to install PHP either on a pre built apache server such as xampp or download PHP directly from the website.
Download xampp or wamp and everything you need to run PHP would be installed with it
eregi
php
If you would like to code this by yourself, you need to understand SQL language and php, and also (maybe) html. But, you can also find some scripts to download for free, like this one: free-php-login-script.com. It works great!
this is not really a question... But I think you are asking why php functions inside a HTML button do not work. Well probably because php is rendered serverside and is passed to a user-browser afterwards.... it is possible to use php inside onclick... but only to display specific content (javascript function for instance)... it is not possible to let a user decide to run a specific php function by clicking a button.
It would be better if you just view them online. There is enough material available on the web for PHP. If you still want to download and view it offline, then I suggest one of the PHP E-books