|
|||||||
| Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
help for a LAN .... i need some html help
Ok im making an interal web for a LAN, its used as a file sever and tourney registration, will its comeing along really well. But i cant find a way to get the name that user put as there nick to go to txt file....basicly i need something that it is simple where users can put there nick / sn and it will be sent to a txt file that the name is added to.
Any help would be apricated ... cuz im stumped. Also is there a why to make a web page or code that will take or read data from a .txt file and display it?\ TIA Last edited by Sourcer_2002; Aug 7, 2003 at 04:32 AM. |
|
|
|
|
|
#2 |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
You'll definitely need something like PHP or Perl to be able to do that. I'm assuming you have an Apache or IIS server set up?
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5 router (FreeBSD/amd64 8-CURRENT): Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram - Headroom MicroDAC Portable sound: Rockboxed iPod Video -> Westone UM2's Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10 |
|
|
|
|
|
|
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
apache is what im useing, and ill simplfiy what i want done .. i want a user to be able to put there name in a text box and submit it, i would like that submited name to be saved in a txt or database ( the same txt file that other names are in, so i want to add its name not overwrite ) and then have a page that can "read" what is in the file or database and display it....or to just have the sumbited name go to a webpage...
|
|
|
|
|
|
|
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
is there a way to do it dreamwaver? Or php that writes to a mysql database?
|
|
|
|
|
|
|
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
help me please!!!
|
|
|
|
|
|
|
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
I dont feel like im explaing this right here is another go...
Ok i want a simple a field where a user can enter his name and it will be saved in a database or txt file... EXAMPLE i enter my name here on page register.htm: Sourcer it is saved in registered.txt without overwriting the old enterys then its displayed on results.htm the simpler the easier as this for a lan and i dont need anything bad...also i would like to adapt this for a 12 man team Battlefield registration...some software that could do this that is made for lans would nice also....any help would grateful Thanks in advance! Sourcer also sorry if this in the wrong area i wasnt sure where to put it. |
|
|
|
|
|
#7 |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
http://www.php.net/
All the answers lie there. To display a textfile, you would use an include like this: Code:
<?php include ("file url goes here"); ?>
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5 router (FreeBSD/amd64 8-CURRENT): Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram - Headroom MicroDAC Portable sound: Rockboxed iPod Video -> Westone UM2's Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10 |
|
|
|
|
|
|
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
thanks man...so i can have the form save a txt file and that php function will display it?
|
|
|
|
|
|
#9 |
|
Unbiased.
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0 ![]() |
Post the HTML and I'll edit some PHP in to do what you want it to do.
__________________
[img][/img] [color=White]Peace be with you, Joe.[/color] Driverheaven Staff Member (Supermoderator) |
|
|
|
|
|
|
|
BANNED
Join Date: Jul 2002
Location: Indiana , USA
Posts: 2,677
Rep Power: 0 ![]() |
well if you could just make a blank page with a form feild to sumbmit a name and have it save to a file and then be displayed on another page would be great....i can do the rest.
|
|
|
|
|
|
#11 |
|
Unbiased.
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0 ![]() |
Here's some code I'm ripping out of something else I've already written. Just copy it into a file named list.php and run it on apache after installing PHP, and it should work fine.
EDIT: It's not working perfectly, so once I have apache and php downloaded onto this computer I'll fix it up. EDIT: Updated, now dynamically changes # of textboxes... Code:
<?php
$names = unserialize(file_get_contents('names.list'));
if (isset($_POST['newdata']) && $_POST['newdata'] && ($_POST['password'] == 'pwd')) //change pwd to any password you want
{
while (list ($ltp, $ltpv) = each ($_POST) )
$names[$ltp] = (string)$ltpv;
$fp = fopen('names.list', 'w');
fwrite( $fp , serialize($names));
fclose( $fp );
}
?>
<html>
<head>
<title>Name List</title>
</head>
<body>
<form method="post" action="list.php">
<?php
$limit = 5;
for ($i = 1;; $i++)
{
if ($i >= $limit)
{
break;
}
$namenum = 'name'.$i;
if ($names[$namenum])
{
$nameval = $names[$namenum];
}
else
{
$nameval = '';
}
$textbox = '<input type="text" name="name'.$i.'" value="'.$nameval.'" /><br />';
echo $textbox;
$spareboxes = 3; //change 3 to any number of extra empty text boxes you want
if ( (($limit - $i) <= $spareboxes) && ($names[$namenum]) )
{
$limit++;
}
}
?>
<br />Password to update:<br />
<input type="password" name="password" /><br />
<input type="submit" name="submit" value="Submit" />
<input type="hidden" name="newdata" value="1" />
</form>
</body>
</html>
__________________
[img][/img] [color=White]Peace be with you, Joe.[/color] Driverheaven Staff Member (Supermoderator) Last edited by ToshiroOC; Aug 8, 2003 at 02:28 AM. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|