Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    learning how php works

    Hey, so i've been reading about php and learning the code but i need some help on clarifying how it works. I've done some c++ and java programming before so I have a pretty good sense of how to program. However I think I keep over complicating how html/php/mysql all work together.

    So with a website that has an area for users to enter in information. this info is submitted and then php processes the information. so first question is the php code that processes this written in the same html document or is a php document called by the html document?

    Once the information has been processed its saved into the database, right?
    If the information is supposed to be posted somewhere on the website is that page a .php file or .html.

    How is php used to get the information saved in the database to be posted on the webpage.


    These questions all might be just basic knowledge of using php but like i said i'm just starting to learn php and want to get some things straight about it and know at least how it works even if i don't know how to code it yet.
    thanks for any and all the help.

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Posts
    100
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by voodoo View Post
    So with a website that has an area for users to enter in information. this info is submitted and then php processes the information. so first question is the php code that processes this written in the same html document or is a php document called by the html document?
    Either way will work. If you are going to place the PHP code and the HTML in the same page, make sure that document has the .php extension.

    Quote Originally Posted by voodoo View Post
    Once the information has been processed its saved into the database, right?
    You can store the information in a database if you wish. You can also store it in a text file.

    Quote Originally Posted by voodoo View Post
    If the information is supposed to be posted somewhere on the website is that page a .php file or .html.
    .php because you would have to use PHP to display the information on the page.

    Quote Originally Posted by voodoo View Post
    How is php used to get the information saved in the database to be posted on the webpage.
    You would have to use a mySQL query for that.

    PHP Code:
    $query mysql_query("SELECT * FROM table"); 
    I hope this helps.

  • #3
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    You can use .html extentions and just patch up your .htaccess?
    Every php function has a manual page at www.php.net/function.(name) replace (name) with the actual name of the function.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •