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]
Comments
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
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
Remember: your new line doesnt have to be at the end of the code
The Royal Ram
Then... maybe someone can print $intro... wink wink... lol
echo "All fields required";
}
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
$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
[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]
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
The Royal Ram
$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 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
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
$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
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
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...
}
else {
echo "Mwahahahah";
}
[/php]
If you guys havnt noticed. I like saying that...
$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]
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
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
The Royal Ram
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
The Royal Ram
<html>
<head>
<title>Stupid question.</title>
<meta name="keywords" Stupid, Question.>
</head>
<body>
<p><b>Are cats living bieings?</b></p>
</body>
</html>
[/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]
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