Tutorials about php

Headers already sent – Solve

Most programmers get the warning of headers already sent in php. This warning occurs due to using header function of php. To remove the warning in your webpage simply place @ in front of header function but this stops working of header function some time. To solve this problem you can use javascript redirect function. Here is the code:- <?php echo "<script type='text/javascript'> <!-- window.location [...]

By |2024-03-27T13:03:54+00:00July 29, 2011|Php Tutorials|1 Comment

convert local variable to global variable in php

Suppose you have a variable which has same name as declared within the function and outside the function. But that variable has different scope. If the variable is declared within the function then it is called local variable and if it declared outside the function then it is global variable. If we assign/change the value in local variable it does not effect global variable. So we [...]

By |2024-03-27T13:04:04+00:00May 18, 2011|Php Tutorials|0 Comments

Upload any file using html and php

Today i will explain you how you can upload any file using html and php. I have make one upload folder in which all the uploaded files will be stored. Then i am making index.html and upload.php files. The index.html file looks like this:- <!DOCTYPE HTML> <html> <head> <title>Uploading files</title> </head> <body> <form action="upload.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <br /> [...]

By |2024-03-27T13:04:06+00:00May 15, 2011|Php Tutorials|0 Comments
Go to Top