Coding forum FAQ + Bookmarked threads
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Coding forum FAQ + Bookmarked threads

  1. #1
    WARNING: I am watching u! jayant's Avatar
    Join Date
    Aug 2002
    Location
    New Delhi, India
    Posts
    886

    Post Coding forum FAQ + Bookmarked threads

    Following are a few bookmarked links to the most common questions on this forum.
    • How to avoid PHP handling errors : generated by the functions, Why is the @ symbol used?, What is the difference between functionname() and @functionname().
    • Resizing Images
    • Pagination (alternative, alternative 2): Span pages like - Page 1, Page 2, Page 3, .... or 1-10, 11-20, 21-30, ...
    • Alternating Row Colors : How to have alternating row colors in a table
    • Clickable Ordering : Sorting the rows in Ascending or Descending order by any field just thru a single click.
    • Register Globals : Let the script behave as if register_globals is on even if it is off.
    • Writing numbers with decimal places, e.g., 4.5 as 4.50; it's called number_format, people.
    • My variables don't work when I 'write $them like this'. No, they don't. If you want variables inside strings to work like variables the strings need to be "double-quoted". Info can be found here, here, here, here, and most importantly here.
    • A parse error about some kind of "unexpected $end" on the very last line of the file? You're probably missing a closing brace. If you're not (have you checked?), that thread suggests some other possibilities. But a missing "}" is the most likely cause.
    • GD Lib is messing up the colours of my images!
    • cron: It's for running programs at regular intervals. You can use it for your scripts, too. (Windows has a task scheduler.)
    • Progress meters for things like file uploads? PHP's session extension provides an interface for monitoring upload progress. The APC extension also hooks to allow monitoring files as they are being uploaded. An IBM article illustrates its use. Prior to 5.2, it was basically impossible to do purely in PHP. If you're using an older version, then you'll have to mix technologies (e.g., this one which uses a bit of Perl), or an independently-developed hack (such as this patch and extension that claims to add support). Either way, you will want some Javascript coding to keep the progress bar updated.
    • Bunkermaster's Debugging 101 thread in the Echo Lounge.
    • planetsim's sister thread to this one.
    • planetsim has also compiled a list of tutorial links.

    Links
    • PHP Manual
    • www.php.net/links. Professional associations, link catalogues, FAQs, script libraries, developers' articles, tutorials, magazines, accelerators/encoders/compilers, editors, hosting, job listings.... you still here?
    • Paul Hudson's Practical PHP Programming


    If you feel that we missed out some. Just PM moderators of this forum.
    All replies to this thread when this thread is unlocked/being edited will be deleted.

    When you have got your problem solved please click the "Mark Thread Resolved" at the bottom of the thread. This makes it easier for people go to threads where there are more chances of them finding a working solution.

    Extra board markup
    • For posting PHP code, put it in [php]...[/php] tags:
      PHP Code:
      for($i=$n+50$i<2*$n$i++)
      {
          echo 
      "Just some text on line $i\n";

    • For HTML markup, use [html]...[/html] tags:
      HTML Code:
      <form action="upl.php" method="GET">
      	<input type="text" value="FOO!" />  and then <input type="submit" value="SUBMIT!" />
      </form>
    • For any other sort of code and stuff for which you want the spacing to remain
      unchanged, use [code]...[/code] tags:
      Code:
      id | username | passwd
      ---+----------+--------------------------------
       1 | jsmith   |cae8d14edd025e72c59dbab6f378c95a
       2 | ffoobar  |6cfe61694ee1bb13ae719d47c2f80b7a
       3 | jbloggs  |8fc42c6ddf9966db3b09e84365034357
       4 | hseldon  |e82df739dd8c84c8ae105b514f4c10df
       5 | dolivaw  |0e9312087f58f367d001ec9bae8f325a
         (__)
         (oo)
      moo \/-------\
           ||     | \
           ||---W||  *
    • To prevent vBulletin from parsing board markup tags when you don't want it to, wrap them in [noparse] ... [/noparse] tags. This works for smilies, too :).
    • Please use these, as they make code much easier to read!



    Do's / Don'ts
    1. The General overview:
      If it's improper to say something in a public place comprised of mixed races and ages, it's inappropriate to post it here in the forums.
    2. Advertising on the board:
      We can't allow this in any form. If someone is interested in getting exposure through the site, please contact the administrator via email at staff@phpbuilder.com . Footers may contain a pitch - it's a bit of a trade-off. The user is contributing to the community and in return they get exposure via their footer. Posting useless stuff and a huge ad in their footers is a complete NO.
    3. Off topic posts:
      Please use the Echo Lounge forum.
    4. Footer size: We need to limit this to 5 lines. Obviously if there are 20 posts on a page and we allow more, we'll end up with 100 extra lines to scroll when reading messages.
    5. Job posts:
      They all go here. Posting them anywhere else will see them deleted, and may earn an infraction.
    Last edited by Weedpacket; 10-27-2011 at 08:07 PM.
    Jayant Kumar Gandhi
    Computer Help | GZip/ Page Compression Test | My pic/ How I look?
    Marking the thread as 'resolved' is more important than saying "thanks. that solved it"
    Click "Mark Thread Resolved" in the thread tools and the top of the thread.
    Keep sensible thread titles.

  2. #2
    WARNING: I am watching u! jayant's Avatar
    Join Date
    Aug 2002
    Location
    New Delhi, India
    Posts
    886
    Keep sending suggestions folks!!!
    Jayant Kumar Gandhi
    Computer Help | GZip/ Page Compression Test | My pic/ How I look?
    Marking the thread as 'resolved' is more important than saying "thanks. that solved it"
    Click "Mark Thread Resolved" in the thread tools and the top of the thread.
    Keep sensible thread titles.

  3. #3
    Missing in Action LordShryku's Avatar
    Join Date
    Aug 2002
    Location
    Occupational Hypnotherapy
    Posts
    7,227
    You could throw some links up there to the MySQL manual and MySQL reserved words page

    [edit]Yeah...I should probably provide the links...[/edit]
    Last edited by LordShryku; 11-01-2003 at 01:29 AM.

  4. #4
    Member dta's Avatar
    Join Date
    Oct 2003
    Location
    n.jersey
    Posts
    81
    wondering about the '&' sign? check this post out.
    $drink->heineken();

  5. #5
    Junior Member
    Join Date
    Mar 2006
    Posts
    4

    Coding

    Hi...i'm new at this PHP thing and i'm not sure how to code things and how the code thing works....where do the codes go? i'm an administrator on a website...where am I supposed to put the codes? I'd greatly appreciate it if you can help me out..


    Thank you


    Sincerely,


    Nour

  6. #6
    NMaOtBG bpat1434's Avatar
    Join Date
    Oct 2004
    Location
    Around 255.255.255.0
    Posts
    7,850
    Codes start with either <?php or <? depending upon your PHP setup. The first is the global way, the second is an alternative (called "short tags") and isn't guaranteed to be enabled on every server.
    The ending tag is ?> (note no PHP) and delimits that the PHP parser should stop parsing at that point.

    You can chunk code like:
    PHP Code:
    <?php
    // This is the first chunk
    ?>
    <!-- Some HTML code would be in here -->
    <?php
    /// This is the second chunk
    ?>
    and the parser would do all the code.

    With PHP, each line is ended with a semicolon (. If you don't end your line with it, you get a parse error, then you have to go find where you missed it.

    You can of course read all this and more in the manual (linked above).

  7. #7
    Senior Member
    Join Date
    May 2002
    Posts
    582
    and maybe start from this page:

    http://us2.php.net/tut.php

  8. #8
    I see what you did there
    Join Date
    Sep 2004
    Location
    Albany, NY
    Posts
    1,889
    rather than start a whole new thread, whats the usage of the arrow for? $var->something;
    ***If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"***

    Dev Server: Apache 2.4.x | PHP 5.4.x | MySQL 5.x

    PHP Manual | Learn HTML | Validate HTML

  9. #9
    NMaOtBG bpat1434's Avatar
    Join Date
    Oct 2004
    Location
    Around 255.255.255.0
    Posts
    7,850
    $var is an object in PHP and the arrow "->" is something like the function/child of that object.

  10. #10
    Junior Member
    Join Date
    Nov 2007
    Posts
    3
    I registered but none of my posts will appear
    Last edited by willg; 11-13-2007 at 01:11 PM. Reason: spelling

  11. #11
    NMaOtBG bpat1434's Avatar
    Join Date
    Oct 2004
    Location
    Around 255.255.255.0
    Posts
    7,850
    Yes, possibly because your posts are moderated for whatever reason (content, links, whatever) and is waiting on a Mod to approve your posts. I've approved your posts. Next time, if your post doesn't show up immediately, you don't need to repost, just wait for a few hours. If it still doesn't show up, just wait longer.

  12. #12
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Also use latest php

    We should also put out a message telling users to move to PHP5.

    Or have a message to all developers as "Recommended to use PHP 5.2 or later"

  13. #13
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,885
    Quote Originally Posted by php-web
    We should also put out a message telling users to move to PHP5.
    We had just such a notice posted throughout the second half of last year.
    PHP 4 IS NO LONGER BEING SUPPORTED!!

    UPGRADE PHP AS SOON AS POSSIBLE.


    PHP has announced that PHP 4 will no longer be supported beginning January 1, 2008. They ask people to start migrating over to PHP 5 now.

    Critical security releases for PHP 4.4 will be released on a case-by-case basis

    Quote Originally Posted by PHP
    [13-Jul-2007] Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued.

    The PHP development team hereby announces that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. We will continue to make critical security fixes available on a case-by-case basis until 2008-08-08. Please use the rest of this year to make your application suitable to run on PHP 5.

    For documentation on migration for PHP 4 to PHP 5, we would like to point you to our migration guide. There is additional information available in the PHP 5.0 to PHP 5.1 and PHP 5.1 to PHP 5.2 migration guides as well.
    PHP 4.4.9 is the FINAL version of PHP. According to some, the Suhosin project will continue to release security updates for the 4.4 branch; however, PHP 4.x is no longer supported by the PHP group. Suhosin is a 3rd-party development project. It is highly recommended you upgrade.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  14. #14
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    13,941
    There's even a web site dedicated just to encouraging the upgrade: GoPHP5.org
    Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett

    "But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because hes a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html


    eBookworm.us

  15. #15
    NMaOtBG bpat1434's Avatar
    Join Date
    Oct 2004
    Location
    Around 255.255.255.0
    Posts
    7,850
    Glad to see my sticky could be made useful

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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