Jump to content


PHP code prob!


3 replies to this topic

#1 technofuse

    Young Padawan

  • Members
  • Pip
  • 21 posts

Posted 28 December 2004 - 05:28 PM

Hello,

I have my website all coded up in HTML and poor old me i have to use dreamweaver and everytime i want to add news I have to go through all that touble! B) I also want to build a database and have users login the same as PHPBB and Invision...

So okay this is not really a prob but I need help! Where can I learn all these functions etc. for PHP??? And how to I combine HTML and PHP together? Like I see all these sites with cool graphics coded in PHP how is that possible? I also want to be able to add news by just adding to the PHP with a news automated script. Without having the trouble off going through HTML. So my question are...

1. Where can I properly learn PHP without going to school or library (doesn't have PHP books)?
2. Is it possible to add PHP into like a HTML table?
3. How do you code PHP into like a proper page not just text etc?
4. Do you need to know anything other than HTML to learn PHP?
5. How long does it normally take to learn it from a noob point of view?

Thanx,

#2 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 28 December 2004 - 06:51 PM

I can't answer a lot of your questions because I don't have the time nor the energy to explain it fully... but HTML and PHP work together seamlessly. HTML is still used in sites with PHP, the PHP is just used to give dynamic elements.

<html>
<head>
<title>This is the title</title>
</head>
<body>
This is an HTML sentence.<br>
<?PHP echo'This is a PHP statement.<br>'; ?>
This is another HTML sentence
</body>
</HTML>


#3 adam123

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 2,306 posts
  • Location:London, UK
  • Interests:Programming and stuff.

Posted 29 December 2004 - 05:15 PM

Although you said you couldn't have books, they were probably the best thing to help me learn. If there isn't any in your library or school, try to buy some off ebay or amazon.

Some good ones are: PHP for the world wide web by Larry Ullman
PHP Advanced for the world wide web by Larry Ullman
PHP & MySQL for dummies - Janet Valade
PHP and MySQL web development - Luke welling & Laura Thomson

I don't think you need to learn anything else to learn PHP, although learning some MySQL would help.
To learn what i've learnt so far (which is quite alot), It took about four months.

#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 29 December 2004 - 08:26 PM

Quote

1. Where can I properly learn PHP without going to school or library (doesn't have PHP books)?
php.net, basicly the people who founded php made the site, it has a whole lot of stuff to help you learn, i suggest as a starting point, looking for the echo function and how to use variables. Also note all "lines" end in a semi-colon, and by "lines" i don't mean every time you hit the enter/return key.

Quote

2. Is it possible to add PHP into like a HTML table?
what jaymz said

Quote

3. How do you code PHP into like a proper page not just text etc?
well, after you do step 1, you'll realize you can "echo" html out, like this:
<? echo "<table><tr><td>Cell1</td><td>ect...</td></tr></table>"; ?>

Quote

4. Do you need to know anything other than HTML to learn PHP?
SQL can help with some dynamics, but it's not neccessary.

Quote

5. How long does it normally take to learn it from a noob point of view?
took my about a month to get the hang of it, 2-3 months to start writing my own scripts, 4 months to fully grasp it... all free i-net sources like here and php.net, it all depends on how fast of a learner you are.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users