Joint Script

PythonPython Forum LeaderThe Royal RAM
I seen this done at another forum and thought it could end up quite good. The only difference is that this version is much more complex since we can use databases :)

Basic Idea
Basically everyone here who knows PHP cand each contribute to this thread to slowly create a script which might hopefully work. You have got a choice between doing the following:

Edit a previous line(1 block only e.g. a function)
Post a new line of code(only 1 line)

Here an example:

Bob posts:
<?php

Then, bill would post:
<?php
$variable = "Hello, this is an example";

Understand?

When posting your extra line or edited version make sure you include all the code so far so that it will be easy to read.

If you want to create a database or a text file just make a comment using // which states what your db tables are etc...

Ill begin:

[PHP]<?php[/PHP]

The Royal Ram

Comments

  • martian2k4martian2k4 Llama Hunter Moderator
    [PHP]<?php
    if( (!$username) or (!$password) or (!$email) or (!$agree) )[/PHP]
    the idea is that the form is under here and the action is PHP_SELF so it will check if any thing is blank and agree is a check box to see if they have agreed to the terms I DONT THINK THAT SYING WHAT I WAS THINKING OF HAPPENING IS AGAINST THE RULES I HOPE NOT :D
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • PythonPython Forum Leader The Royal RAM
    no feel free to say what you would like to happen...but people can change it if they want

    Remember: your new line doesnt have to be at the end of the code

    The Royal Ram

  • CannonBallGuyCannonBallGuy Moderator Shared Hoster
    I suck at php... but I can do some basics..:
    <?php 
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$username) or (!$password) or (!$email) or (!$agree) )
    

    Then... maybe someone can print $intro... ;) wink wink... lol
  • ForgeForge Senior Member The Royal RAM
    {
    echo "All fields required";
    }
    Can fat people Go skinny Dipping?
  • martian2k4martian2k4 Llama Hunter Moderator
    is it only once that we can post yah :confused:
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • voormavoorma Member NAT Warrior
    [PHP]<?php
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$username) or (!$password) or (!$email) or (!$agree) or (!$disagree) )
    <? include ( 'http://devdreams.com/forum/stupid/question.html' ); ?>[/php]

    what? i am very bad with php:P
    voorma5ny.jpg
  • CannonBallGuyCannonBallGuy Moderator Shared Hoster
    This is better, I think... :
    [PHP]<?php
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$username) or (!$password) or (!$email) or (!$agree) or (!$disagree) );
    include ( 'http://devdreams.com/forum/stupid/question.html' );
    [/PHP]
  • martian2k4martian2k4 Llama Hunter Moderator
    actually now it will check to see if the dissagree box has been checked :(
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • CannonBallGuyCannonBallGuy Moderator Shared Hoster
    what disagree box? where?
  • PythonPython Forum Leader The Royal RAM
    no you can post as many times as you like...as long as you dotn ahve 2 posts after each other

    The Royal Ram

  • martian2k4martian2k4 Llama Hunter Moderator
    [PHP]<?php
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$username) or (!$password) or (!$email) or (!$agree) );
    echo 'Please fill out all fields :)';
    echo '$intro';
    include ( 'http://devdreams.com/forum/stupid/question.html' );
    [/PHP]
    I was thinking mabey the next person could do the first line of the form :D hint hint .. and i was wondering what we were on the way of building coz i misread and thought it was a script for people to register through lol
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • voormavoorma Member NAT Warrior
    som1 here knows or is good at PHP?
    voorma5ny.jpg
  • PythonPython Forum Leader The Royal RAM
    [PHP]<?php
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$username) or (!$password) or (!$email) or (!$agree) );
    echo '<b>Please fill out all fields</b><br><br>)';
    echo '$intro';
    include ( 'http://devdreams.com/forum/stupid/question.html' );[/PHP]

    I just added a little html formatting to the error text

    The Royal Ram

  • martian2k4martian2k4 Llama Hunter Moderator
    lol i'm always making mistakes with html in php lol php by it self fine html fine html+php :eek:
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • voormavoorma Member NAT Warrior
    hmmmmm i dont know php so i cant answer more on this thread:( altough i'l keep watching
    voorma5ny.jpg
  • CannonBallGuyCannonBallGuy Moderator Shared Hoster
    Argh!!!!!!!
    Python!! Do Not Use <b> !!!

    And we are also suppossed to end all tags now, so <br> should now be <br />
    [php]<?php
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$username) or (!$password) or (!$email) or (!$agree) );
    echo '<span style=\"font-weight:bold;\">Please fill out all fields</span><br /><br />)';
    echo '$intro';
    include ( 'http://devdreams.com/forum/stupid/question.html' );[/php]

    Thats better. :P
    P.S. for those of you who are even worse at php than me... I have put \ before the quotation marks in the echo to show they should be printed... Basically so they do not get confused with the quotation marks at the start and end of the echo statement... :)
  • ForgeForge Senior Member The Royal RAM
    [php]
    }
    else {
    echo "Mwahahahah";
    }
    [/php]

    If you guys havnt noticed. I like saying that...
    Can fat people Go skinny Dipping?
  • martian2k4martian2k4 Llama Hunter Moderator
    [PHP]<?php
    $intro = "This is a stupid script built by everyone who knows PHP";
    if( (!$name) or (!$message) or (!$email) );
    echo '<span style=\"font-weight:bold;\">Please fill out all fields</span><br /><br />)';
    }
    else {
    echo "Mwahahahah";
    }
    echo '$intro';
    include ( 'http://devdreams.com/forum/stupid/question.html' );
    include ( 'http://devdreams.com/forum/stupid/form.html' );

    [/PHP]
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • voormavoorma Member NAT Warrior
    does any1 can give/make me a simple, but secure login script?
    voorma5ny.jpg
  • martian2k4martian2k4 Llama Hunter Moderator
    email/PM me and we'll talk voorma :D
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
  • voormavoorma Member NAT Warrior
    kk, i will:)
    voorma5ny.jpg
  • PythonPython Forum Leader The Royal RAM
    ok, CBG...thanks for correcting my code, lol

    The Royal Ram

  • PythonPython Forum Leader The Royal RAM
    by the way...I noticed that two files have been included:

    question.html

    and form.html

    You can begin writing the code for these too.. Just make sure their code is seperate and is easily distinguishable from the other code blocks

    The Royal Ram

  • voormavoorma Member NAT Warrior
    i add question.html just for fun.. nothing serious with it :P
    voorma5ny.jpg
  • PythonPython Forum Leader The Royal RAM
    but if its being included then the file needs to exist...

    The Royal Ram

  • voormavoorma Member NAT Warrior
    thats true... ok the file question.html will be in the next msg
    voorma5ny.jpg
  • voormavoorma Member NAT Warrior
    [HTML]
    <html>


    <head>

    <title>Stupid question.</title>
    <meta name="keywords" Stupid, Question.>
    </head>


    <body>
    <p><b>Are cats living bieings?</b></p>
    </body>


    </html>
    [/HTML]
    voorma5ny.jpg
  • martian2k4martian2k4 Llama Hunter Moderator
    here is form.html

    [HTML]<form name="form1" method="post" action="<?php PHP_SELF ?>">
    <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Name :</font></p>
    <p>
    <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="name" type="text" id="name">
    </font></p>
    <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Email :</font></p>
    <p>
    <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="email" type="text" id="email">
    </font></p>
    <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Comments :</font></p>
    <p>
    <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
    <input name="comments" type="text" id="comments">
    </font></p>
    <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Is this site
    good?</font></p>
    <p> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Yes
    <input type="radio" name="yes" value="radiobutton">
    No
    <input type="radio" name="no" value="radiobutton">
    </font> </p>
    </form>[/HTML]

    ;)
    Free MySpace Layouts- Coming soon
    Photoshop Tutorials- Coming soon
    Premium PHP Scripts- Coming soon

    Haha i should really do some work so i can remove all the coming soon's
Sign In or Register to comment.