Jump to content

Arimil

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Arimil's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks took me a while to figure out what you meant there but I got it thanks.
  2. So I began making my site today and I noticed a lot of places give users and id rather than referring to them by their username. So, my question is simply... why?
  3. It would help if you told us exactly what you are having trouble with. All you say is you can't get that tutorial to work. If you followed the tutorial and get no synax errors when attempting to view your web page post up the code you made so someone can take a look at it and show you what your doing wrong. It seems you expect someone to do this for you which isn't going to happen. If you don't think that tutorial is what you are looking for then I suggest looking at the following. This will teach you how to read information from a database. http://www.freewebmasterhelp.com/tutorials/phpmysql This will teach you how to generate images using PHP. http://www.devarticles.com/c/a/PHP/Generating-Images-on-the-Fly-With-PHP/ Although like most tutorials these require that you have some programming knowledge if you know absolutely nothing about PHP then I suggest you go here it will teach you the basics. http://w3schools.com/php/php_syntax.asp
  4. Actually I think I know why its bad to do this. I was thinking and if it's a PHP page why should it have HTML in it at all? The correct way to do it would probably be to have external pages to generate the headers etc so they can easily move from page to page. But that still leaves me with the problem of using echo to create the page. Anyone?
  5. So I've been working on PHP for quite some time now and I'm confident I can do pretty much anything after looking up a few commands. But one thing thats been bugging me is I think I'm outputting information to HTML incorrectly. For example. <head> <?php if(stristr($_SERVER['HTTP_USER_AGENT'], "Android")){ echo "<meta http-equiv="refresh" content="0;url=http://android.website.com">"; } ?> </head> <body> <?php echo "Your user agent is " . $_SERVER['HTTP_USER_AGENT']; ?> </body> But I remember reading something when first starting with php that you should always put all of your php content at the top of your document or something like that. I also read somewhere that its bad to echo information like that. Someone mind showing me how you would go about doing something like this correctly?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.