- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
Your web page must have a .php extension (and your provider must support PHP). Then, your code must output something, even a simple
print "Hello, world";
at this point, you modify your web page so that the HTML code, at some point, reads
<?php Your code ?>
and at that point you'll see in the browser the output of said code; or possibly an error. Remember that if your provider chose to not let users (that includes you!) see any errors, you'll see absolutely nothing. In this case my suggestion is to start simple, or download a WAMP installation to try the code at home on your PC before uploading to your website.
you had not provided complete detail that if you are having database for username or you want to fetch username from 'email providing site' in which your user created his account.if you are trying for second option,It is almost not possible coz any of the email providing site will not exchange personal detail of any of his acc holder.
if you are trying first option,session in php can help you.you can store username in a session variable n then u can access them on any page if session is not destroyed or expired.
You might want to note that this is not the most effective manner of creating a counter in PHP. On a few of my websites, I find it is much more effective to simply create a text file, eg. counter.txt and have PHP read that every time the page is loaded, instead of running a MySQL query. Then, have PHP also update the counter.txt file by adding 1 to the number already listed in the file and read to the user.
Most often the problem is caused by loops in your PHP. One common mistake is to forget to actually ++ add to the counter at the end of a loop, so your loop will continue to run forever. Another common mistake is that, you do add to the counter, but then accidently overwrite it again at the start of the next loop, so you never gain any ground.
Depending on what your loops is doing, this can cause your script to continue to output the same information over and over again (continuing to make the page longer and longer and longer) or it can keep processing the same information over and over without outputting anything giving it the appearance of a page that is trying to load but is lagging.
One way to help you spot this is to echo () the current counter number (or other useful information) at the beginning of each cycle. This way you might get a better idea of where the loop is tripping up.
If you're not using loops, you may want to double check that any HTML or JAVA you are using on your page isn't causing the problem, and that any included pages are without error.
This error means that the program doesn't understand the code you wrote.
If you are lucky the error points to the file and the line number where PHP got confused. Sometimes PHP points directly at the error, but other times PHP is confused as a result of an earlier error in the script.