Jump to content
  • Announcements

    • boen_robot

      Guidelines and Netiquette   03/28/2017

      Posting Problems:   Having problems posting your topic? Read through this: To join, you agree to our terms and conditions and fill out and submit a registration form. An activation email will be sent to your email adress, so you'll need to verify your account. After that the account has to be validated by one of the moderators. This will mean that it can take up to a day to be activated. A couple of things to remember to ensure approval: Don't use an email address in one of those $2 four character .com domains eg. xyds.com. These will be deleted and the domain added to the banned list. Don't use an email address that is within a domain with a bad reputation for spam. A Google search is run on every email address and email domain. Don't sign up with an email address that doesn't exist, doesn't work or requires the sender to answer a quiz before their email can get to you. Put your country and or state and city in the signup form. Blank forms will go to the botton of the "to do" list. And make sure that your email address and your country match, saying you're from Alabama and using a .ru email address is not going to get you activated. After a membership is activated the first few posts will be monitored. Posting spam or unapproved topics described in the agreement results in an immediate ban. The email provider and the IP addresses associated with the account will be banned and all posts will be deleted. These strict measures have been deemed necessary to hinder spam. Sorry for any inconvenience this causes, but it's not liable to change. If, after reading this, you still can't post and don't understand why, contact one of the Moderators listed here.   Topic Guidelines   Including the following information can expedite an accurate response from board members: Must be a Specific Problem or Question related to web design and development Include Code in Question (wrap with   for small blocks of code and for longer blocks   ) Include Code Author Include Extra Notes/Modifications/Attempts Include web link to page/file when possible Content Guidelines   You may not post, upload, link to, or email any Content that contains, promotes, gives instruction about, or provides prohibited Content. Prohibited Content includes any Content that breaks any local, state, county, national or international law. Prohibited Content also includes: No direct or indirect advertising or websites, forums, products, services No hijacking of posts (do not post your question in someone elses) Content that infringes upon any rights [ex. MP3s and ROMs] (including, but not limited to, copyrights and trademarks) Abusive, threatening, defamatory, racist, or obscene Viruses or any other harmful computer software False Information or libel Spam, chain letters, or Pyramid schemes Gambling or Illicit drugs Terrorism Hacking or cheating for internet/online games Warez, Roms, CD-Keys, Cracks, Passwords, or Serial Numbers Pornography, nudity, or sexual material of any kind Excessive profanity Invasive of privacy or impersonation of any person/entity Hacking materials or information Posting Tips   There are more BBcodes than there are buttons for on the reply menu. To get the full list, click "BB Code Help" underneath the clickable smilie face menu. Use   for small snippets of code Use   for lengthy snippets of code Use   if your snippet is HTML (optional) Use   if your snippet is SQL (optional) Rules of Conduct   Be nice. There's no need for calling someone stupid if they ask an 'easy' question. Keep your avatars and signatures absolutely child friendly. We have a younger audience on this forum. Keep your language appropriate for the same reason above. Do not PM moderators for help on the forum. Post on the topic, or create a new one.   Spam:   Recently, as you have all without doubt noticed, we have had lots of spam and advertisement on the forum. Therefore, we'd like to alert you as to what to do when you have found any of the aforementioned annoying messages: it. Immediately. Give a clear reason, please, if the advertising is not evident. DO NOT POST! Report, let the post stay as is, and we will get to it, meanwhile if you continue to post as normal in the other threads, it won't be on the top so long. Refrain from PMing the member. This won't help at all, as they are most likely spambots anyway. Thank you.       Images in signatures:   After thinking of users on dial-up, we have decided to enforce the following rules regarding signatures. Please pay heed to them. Respecting these rules is respecting the members on this forum with dial-up. Signature rules: No animated images AT ALL. No matter the amount of animation. Maximum image widthxheight: 300x150 Maximum image (file) size: 15kb Use calm colors. Do not use highly contrasting images in your signature, as this can get really annoying when seeing several posts from one member in the same thread. The same prohibited content goes for images as for posts. Lastly, use common sense. No lengthy signatures please. Save us some scrolling. Thank you.       Links in signatures:   Please understand that w3schools.com only exists because of voluntary work and is barely supported by the advertising littered throughout the tutorials and the forum. So, please, stop advertising other sites. DO not post links that drive traffic away from the w3schools domain - especially to a site that offers similar if not identical information. Please help support the site by keeping individuals on it. Thank you. Here are some guidelines as to what you can put in your signature: w3schools links --> allowed w3.org links --> allowed browser links --> allowed html editor links --> allowed personal sites --> allowed tutorial sites competing with w3schools --> NOT allowed sites completely irrelevant to webprogramming and this forum --> NOT allowed   Thanks for understanding, and for taking the time to read this. ~W3Schools Modstaff~
kaijim

PHP Tutorial

Recommended Posts

kaijim    15

Hello everybody!We are currently trying to make the PHP part of the page better.We have taken a small break from writing the reference part (have made over 400 reference pages the last months), and we have started working on the tutorial part.I would very much like to get suggestions on what to add :)

  • Like 2

Share this post


Link to post
Share on other sites
boen_robot    105

A thing I certanly want to see is global variables handling, such as the GET variable. You know, the ones with which when you type "?VariableName=VariableValue" at the end of the URL to trigger special actions in the PHP file.Maybe some more detailed information on form processing and an example of simple MySQL connection and action (just like the ODBC example).And one thing which is probably with the least prirority but... some kind of universal way to install extensions? I mean... most extension's installation follow similar steps, right? If so, what are they? The one of my particular interest is (as some people of this forum could already figure out) a step-by-step way to install the XSLT Processor extension.

  • Like 1

Share this post


Link to post
Share on other sites
Chocolate570    44

I'd love more on SQL connections like boen said, and we need a detailed tutorial on classes. They're pretty important.Maybe some examples on how PHP can interact with AJAX and perform different things too. Sessions would be nice, along with (slightly off-topic) a PHP quiz? I've always wanted to check how much I can do :) (which shouldn't be much) :)I'll see if I can come up with some other things...I suggest you just look at the ASP section and try to balance each one out. :)

Share this post


Link to post
Share on other sites
Jonas    150

An example of an email form, because that is the question that is most often asked here...

Share this post


Link to post
Share on other sites
boen_robot    105
An example of an email form, because that is the question that is most often asked here...

What about the one here? I haven't tested it, but it seems as a PHP email form to me.[edit]@...678 what are you talking about? What you show is BBCode. It doesn't belong anywhere in the PHP tutorial. [/edit] Edited by boen_robot

Share this post


Link to post
Share on other sites
Jonas    150
It was a way to allow post formatting without allowing full html coding.
String replacement, right?

Share this post


Link to post
Share on other sites
kaijim    15

The e-mail form was added yesterday.. so that is brand new... just a simple way to send mail... i am planning to add more examples.. and a guide to avoid spammers getting your mail adress..

Share this post


Link to post
Share on other sites
Jonas    150

Well, then I guess one php example would be string replacement, for a guestbook or forum, with example of how to detect bbcode sets, split it into three (opentag, data to format, endtag) and replace the opentag and endtag with < and > instead of [ and ].

Share this post


Link to post
Share on other sites

I don't know if it is an old idea or a new one, but is it possible to create a Try-it editor for PHP?Maybe eval() could be used for that, like eval($_POST['php_input']);Of cource with limitations :)

  • Like 1

Share this post


Link to post
Share on other sites
boen_robot    105

Nah, that's a really high security risk. More like live example, such as the code on the left and the result on the right WITHOUT the ability to edit the code (like in the ASP tutorials).I think it would be good if something like an example on how to use regular expressions is shown. But perhaps the already suggested regular expressions tutorial would have to be created first though.

Share this post


Link to post
Share on other sites

Such examples would do the trick too :)There is always a security risk when php gets allowed in editors, but maybe it would be just cool when only the ECHO instruction was allowed :)Beginners playing such as echo "I have hacked yor site!!"; :)

Edited by Dan The Prof

Share this post


Link to post
Share on other sites
Jonas    150

Yeah, I don't think a php editor could be more advanced than this. They could even make examples in php, while the file name was still .asp, since the code they output doesn't do anything. That way, they wouldn't need a php server...

Share this post


Link to post
Share on other sites
Little Goat    0

yes, but it would be nice if that could be in the tutorial for noobs (like me!) so they don't have to come here and ask.

Share this post


Link to post
Share on other sites

could you put in the foreach() loop? cant miss anything..

Share this post


Link to post
Share on other sites
scott100    1

Maybe a mention for a program like EASYPHP which includes PHP, Apache and MySQL.It can be a very daunting task for newcomers to get these 3 up and running, when you can just instal a program that does all this for you :)

Share this post


Link to post
Share on other sites
deved    0

I'm a newbie PHP student and see a lot of sites that require logins to access information companies have about individuals such as, ISP's, banks, hosting providors, etc.On your 'web building' page for developers under the Server Side Scripting section, you mention 'Provide security and access control to different Web pages'Could a tutorial be done on this? :)

Share this post


Link to post
Share on other sites
Yuval200    0

Here are some things that by my opinion, would make the php tutorial better:

  1. Here, under the section "Comments in PHP", you forgot to mention that you can use "#" too, like:
    <?php\*Comment!another omment!*\echo "I like ";   //prints "I like "echo "pasta!"      #prints "pasta!"?>

  2. Try to explain more about how to install PHP, Apache and MySQL.
  3. Try to make a page with information about programs that install the three servises, like EasyPHP or WAMP.

Offtopic: a CSS tutorial about designing scrollbars would be nice :) (so far I didn't found one, I might missed it if you have one)

Share this post


Link to post
Share on other sites
Jonas    150

There's no need of a tutorial for css scrollbars, because Scrollbar-css is not a part of any css spesification, be it 1, 2.1 or 3. Scrollbar-css is microsoft only css.

Share this post


Link to post
Share on other sites

With FireFox you don't need to edit the scroll bar to look like the webpage, I want the scroll bar to look like my browser... The scroll bar would really fit into the browser owned more than the webpage owned... not to make a argument or nothing..

Share this post


Link to post
Share on other sites
joecoolaug    1

Well I think that the best thing to add would be detailed explainations of every bit of code. I've noticed that some of the PHP tutorial pages and many others don't explain certain bits of code at all or not enough.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×