Ultimate Gear War
Join the alien war, prepare your gear and protect your base at all cost!
4.19 / 5.00 15,444 ViewsAt 2/14/06 03:00 PM, -fuzz- wrote: could some one please do a tutorial on making a voting system, similar to the page hit thing but it works out what number has been clicked and then works out an average.
is this possable please?
This is very easily possible. In fact I'm going to write it up right now. It's pretty simple for the most part really easy!
im new to coding PHP...and im having a bit of trouble with this piece of code.
$_POST["user"] = fopen("usernames.txt", "a")
im sure im doing this wrong. its not for any crazy username database, just a small test to see what PHP can do. its just not "appending" the posted variable to this text file.
the usernames.txt file is on the same level as the php file on a sub-domain of my site. im not sure if i need to give any more information.
snyggys
oops, i made a mistake. my code still doesnt work, though.
<?php
$stringtowrite = $_POST["user"];
$fp = fopen("usernames.txt", "a");
fwrite($fp, $stringtowrite . "\n");
fclose($fp);
?>
it isnt appending $stringtowrite to my text file, "usernames.txt".
snyggys
At 2/22/06 07:22 PM, 2k_rammerizkool wrote: oops, i made a mistake. my code still doesnt work, though.
<?php
$stringtowrite = $_POST["user"];
$fp = fopen("usernames.txt", "a");
fwrite($fp, $stringtowrite . "\n");
fclose($fp);
?>
it isnt appending $stringtowrite to my text file, "usernames.txt".
could you post this in a new thread? we try not to clutter this one with specific problems
I got a new tutorial up: http://www.newground../topic.php?id=441194
At 2/27/06 05:07 PM, Pilot-Doofy wrote: I got a new tutorial up: http://www.newground../topic.php?id=441194
quite advanced
Due to PHP's Requesting Topic we can expect alot more Tutorials now when we know what we need to write about.
PHP: Main
As a starter of PHP Requesting topic, I'll update the list this time:
-------
Your resource for great PHP tutorials!!!
PHP: GENERAL CODE:
BEGINNER (4)
Begginer Tutorial by GamesCool
PHP: Setting And Returning Cookies by Jams44
Storing Cookies Info by Jams44
Website Progress/Percentage by Greeley
INTERMEDIATE (5)
File Uploads by Pilot the mighty Doofy
Good Habits And Security Concerns by
Sir-Davey
Image Resizing by Pilot - Doofy
Securing File Uploads by Pilot Doofy
Using Implode And Explode Functions by GamesCool
replace_tags by Pilot Doofy it has some wicked values, otherwise quite easy
PHP: SPECIFIC PROJECTS:
Count Line Breaks by Zendra, the Teacher
Creating A Random Ad Script by Jams44
Creating A Random Quotes Script by GamesCool
Date Displayer by Jams44
Link Checking (checking for broken links) by Jams44
Shoutbox (MySQL) by WoogieNoogie
Simple Hit Counter by SpamBurger
INTERMEDIATE (6)
Creating A Blog by WoogieNoogie
Flat Files (Create a Shoutbox) by IWantSomefreekingCookies
Random Quote Image by GamesCool
RSS Tutorial by elbekko
Search Engine by Zendra
User Authentication (First Part) by Greeley [In fact just checking if submited data correct. No mysql and sessions yet]
Voting System [From 1 To 5] by Greeley
PHP: USEFUL RESOURCES:
BEGINNER (1)
^^^^^^Total number of tutorials: 26^^^^^^
THAT'S IT!
I've checken it with Dreamweaver and it displayed nice. However, if you find ANY errors, post 'em here!
-----See The Other Version Of This Here
http://www.clan-csc.com/PHP_Tutorials.php
ENJOY! ------
>>>Request PHP Tutorials Here<<<
~{N}~
The user who created it haven't written that here so I haven't seen it.
It is gonna be in the second updating.
Sorry nino but GamesCool is the one who started this list and he's the one who updates it at the top of every page. If we updated the list after every tutorial half the topic would just be filled with updates
And actually, this topic should be the one used to request the php tutorials : /
At 3/7/06 01:33 PM, Afro_Ninja wrote: Sorry nino but GamesCool is the one who started this list and he's the one who updates it at the top of every page. If we updated the list after every tutorial half the topic would just be filled with updates
Then why you don't delete the post, to prevent confussion?
And actually, this topic should be the one used to request the php tutorials : /
And the idea behind it is good, because you have a topic who where it's central about the subject.
NG BBS & Review moderator // PM your randomness and other ramble!
At 3/7/06 01:33 PM, Afro_Ninja wrote: Sorry nino but GamesCool is the one who started this list and he's the one who updates it at the top of every page. If we updated the list after every tutorial half the topic would just be filled with updates
And actually, this topic should be the one used to request the php tutorials : /
I'm sorry then, I just wanted to contribute because I currently don't have a time to write any good Tutorial..
For the second thing, I must not agreed, it is nice to have two spilt topics about that, then we do some kind of connection which is cool :)
Beginner <> intermediate
Capitalize Every Word's First Letter
http://www.newground../topic.php?id=449156
- Matt, Rustyarcade.com
At 3/13/06 03:16 PM, DannyIsOnFire wrote:At 3/13/06 03:02 PM, Ninja-chicken wrote: I have a request:Wrong Thread
PHP sockets
no. The Main Topics have always been used to request tutorials and it's not stopping now. GamesCool made this thread and I notice that thread was made by some random guy so I think I'll stick with requesting here thanks :D
- Matt, Rustyarcade.com
At 3/13/06 04:03 PM, Ninja-chicken wrote: no. The Main Topics have always been used to request tutorials and it's not stopping now. GamesCool made this thread and I notice that thread was made by some random guy so I think I'll stick with requesting here thanks :D
It doesn't really matter. There's not 'official' request topic. Although Afro_Ninja thinks it should be posted in here, I haven't heard anyone else complain about it.
NG BBS & Review moderator // PM your randomness and other ramble!
Well in AS:Main we request from here. And it just takes common sense to see that would be a good function for this thread
- Matt, Rustyarcade.com
PHP: Main
--------------
Your resource for great PHP tutorials!!!
PHP: GENERAL CODE:
BEGINNER (4)
PHP: Beginners tutorial by GamesCool
PHP: Setting and Returning Cookies by Jams44
PHP: Storing Cookie Info by Jams44
PHP: Website Progress/Percentages by Greeley
INTERMEDIATE (7)
PHP: Capitalize Every Word (arrays) by juraj * NEW *
PHP: File uploads by Pilot-Doofy
PHP: Good habits/Security concerns by Sir-Davey
PHP: Image Resizing by Pilot-Doofy
PHP: replace_tags() by Pilot-Doofy * NEW *
PHP: securing file uploads by Pilot-Doofy
PHP: Using explode and implode functions by GamesCool
ADVANCED (1)
PHP: CLI (Command Line Interface) Basics by Dezmerkt
PHP: SPECIFIC PROJECTS:
BEGINNER (8)
PHP: Count Line Breaks by Zendra
PHP: Creating A Random Ad Script by Jams44
PHP: Create a random quotes script by GamesCool
PHP: Date Displayer by Jams44
PHP: Link Checking by Jams44
PHP: Shoutbox (MySQL) by WoogieNoogie
PHP: Simple Hit Counter by SpamBurger
PHP: Voting System (From 1 to 5) by Greeley * NEW *
INTERMEDIATE (6)
PHP: PHP: Creating a Blog by WoogieNoogie
PHP: Flat-files (Create a shoutbox) by IWantSomeCookies
PHP: Random quote image by GamesCool
PHP: RSS tutorial by elbekko
PHP: Search Engine by Zendra
PHP: User Authentication (Part 1) by Greeley
PHP: USEFUL RESOURCES:
BEGINNER (1)
PHP: Rapid Website Development by Sir-Davey
Total number of tutorials: 27
As always, if I made any mistakes please let me know.
Nice update.
It's good to see this list getting more tutorials.
NG BBS & Review moderator // PM your randomness and other ramble!