944,175 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4317
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
May 20th, 2005
0

Hello Dani Web members

Expand Post »
Hello Dani PHP Members.

My name is Michael, I have been looking online for a place to learn php and at this point I have given up.

I am wondering if there is anyone on here that can teach me php and mysql.
Or if you know of any places I can learn from please let me know the web urls.


thank you,
Michael C. :p
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
michaelK5 is offline Offline
9 posts
since May 2005
May 21st, 2005
0

Re: Hello Dani Web members

Hi Michael

How you learn will depend on what other programming languages you know. If you've got significant experience in any other language it's really just a matter of converting the syntax, getting a few new concepts and you're off running.

If you are new to all programming then the learning curve is quite different.

Hunt around for a few tutorials, follow them through. Create guest books, practice applying design. Find a php forum which gets alot of traffic and try answering other peoples questions, or just following through with the answers to see why the recommendations were made.

Sites to watch
PHPClasses.org - a great script repository
Weberdevscripts and articles and Weberforums
Newbies board at PHPBuilder.com
SourceForge
Open Source CMS

A key question to ask yourself is why you want to learn PHP and structure your learning around your goals.

Sarah
Reputation Points: 10
Solved Threads: 1
Junior Poster
sarahk is offline Offline
138 posts
since Apr 2005
May 21st, 2005
0

Re: Hello Dani Web members

Hello Sarah.

I would like to learn as much as possible not just on one subject or one goal, I would like to know how to create anything using php/mysql.

I would also like to learn WAP, and some other things, but I would like to learn php and mysql first.

Also there were a few links that you posted but did not say where to look for php stuff.


Please let me know, Thank you
Michael
Reputation Points: 10
Solved Threads: 0
Newbie Poster
michaelK5 is offline Offline
9 posts
since May 2005
May 21st, 2005
0

Re: Hello Dani Web members

Oh yeah, I forgot to post a link to the most important site of all http://www.php.net

Not only is it the manual but people contribute code there too.

OK Michael

You have a website right, and a MySQL database? either on your PC at home or on the web somewhere? If not, go get one.

Then create a basic hello world site using these file

index.php
PHP Syntax (Toggle Plain Text)
  1. <?php
  2. $title = 'Michaels first page';
  3.  
  4. include 'header.php';
  5. include 'leftnav.php';
  6. //ready to start content
  7. ?><h1>Hello World</h1>
  8. <p>My name is Michael</p>
  9. <?php
  10. // no more unique content
  11. include 'footer.php';
  12. ?>
header.php
PHP Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title><?php echo $title; ?></title>
  4. <style>
  5. body, table { font: 12px Arial, Helvetica, Verdana, Geneva, Sans-serif; }
  6. a { color: navy; text-decoration: none; font-weight: bold; }
  7. a:hover { text-decoration: underline }
  8. </style>
  9. </head>
  10. <body>
  11. <table border='0' cellpadding='0' cellspacing='0'>
leftnav.php
PHP Syntax (Toggle Plain Text)
  1. <tr><td><h2>Menu</h2>
  2. <ul>
  3. <li><a href='page1'>Page 1</a></li>
  4. <li><a href='page2'>Page 2</a></li>
  5. </ul>
  6. </td>
  7. <td>
footer.php
PHP Syntax (Toggle Plain Text)
  1. </td></tr></table>
  2. <div align='center'>&copy; <?php echo date('Y'); ?> Michael</div>
  3. </body>
  4. </html>
You'll see that on some files I break in and out of PHP and in others there is none at all. I also refer to page 1 and page 2 which will be copies of index.php with different content.

Now, you get to muck about adding some html onto the page, playing with the stylesheet to display the fonts and colours the way you want.

Notice that if you change something in header it follows through for the page 1 and page 2.
See how I create a variable called $title but I only use it in header.php and it can see it.

Next, add something from the database...

Sarah
Reputation Points: 10
Solved Threads: 1
Junior Poster
sarahk is offline Offline
138 posts
since Apr 2005
May 21st, 2005
0

Re: Hello Dani Web members

Dear Sarah

:eek: :eek: :eek:

I wish I know what you just did, or even said
Reputation Points: 10
Solved Threads: 0
Newbie Poster
michaelK5 is offline Offline
9 posts
since May 2005
May 21st, 2005
0

Re: Hello Dani Web members

Each code section needs to be a separate file with the name I've given. Upload them onto your php website and ask it for http://www.mysite.com/index.php where mysite is your actual site name.

Sarah
Reputation Points: 10
Solved Threads: 1
Junior Poster
sarahk is offline Offline
138 posts
since Apr 2005
May 21st, 2005
0

Re: Hello Dani Web members

Oh no I have a domains but no hosting right now, Can not find anyone that offers a good thing for a good price.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
michaelK5 is offline Offline
9 posts
since May 2005
May 21st, 2005
0

Re: Hello Dani Web members

This is a great place to start, espcially if you want to understand the difference of PHP4 and PHP5, and you want to learn PHP:

http://www.php.net/manual/en/

--
Installation and Configuration:

http://www.php.net/manual/en/install.php
--

--
Language Reference:

http://www.php.net/manual/en/langref.php
--

--
PHP4 Object Oriented:

http://us2.php.net/oop/
--

--
PHP5 Object Oriented:

http://us3.php.net/zend-engine-2.php--

My suggestion to you is to read the documentation section fully, then move into the PHP5 OO section. PHP5 has a few changes from PHP4 especially in how Object Oriented code is handled, so my suggstion is to familiarize yourself with PHP5.
Reputation Points: 41
Solved Threads: 2
Junior Poster in Training
fsn812 is offline Offline
93 posts
since Jan 2004
May 22nd, 2005
0

Re: Hello Dani Web members

Quote originally posted by michaelK5 ...
Oh no I have a domains but no hosting right now, Can not find anyone that offers a good thing for a good price.
Visit our Hosting Offers forum for some cool deals. If you can't find anything, post in our Hosting Requests forum.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 163
The Queen of DaniWeb
cscgal is offline Offline
13,646 posts
since Feb 2002
May 22nd, 2005
0

Re: Hello Dani Web members

Last edited by cscgal; May 22nd, 2005 at 10:24 am.
Reputation Points: 10
Solved Threads: 0
Light Poster
selbourne is offline Offline
46 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: include(); problem
Next Thread in PHP Forum Timeline: Help With Contact Us Form!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC