Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-02-2003, 11:10 PM
sob is offline sob
Registered User

Join Date: Apr 2003
Posts: 81

PHP help needed

Hi guys, I need someone to help me mod. a submit download module to allow people to upload maps. I've gotten close, I'm just missing the the script for them to upload thier SS.
The website is www.wyd-hq.com if you think you can give me a hand please stop by and pm or email me at sob@wyd-hq.com thanks.
__________________
Reply With Quote
  #2  
Old 11-04-2003, 08:48 AM
morales is offline morales
Registered User

Join Date: Apr 2002
Posts: 79

Try asking bullet over at df-barracks, he may help if you are very nice to him. DFB have a similar script in use that you are looking for i think.
__________________


Mindset Snipers Founder
Dfarena Forum Mod
Mindset Media Web Project Manager
Terranova Crew Member
Mindset Media Web 1998/2004.
Reply With Quote
  #3  
Old 11-04-2003, 10:30 AM
Surge is offline Surge
Registered User

Join Date: Jan 2002
Posts: 265

u just want them to beable to upload the sshot? what about an upload for the map as well?
__________________
Squad Tag Generator
Take the guessing work out of making you squad tag.
unavailable for re-design
Reply With Quote
  #4  
Old 11-04-2003, 11:32 AM
Surge is offline Surge
Registered User

Join Date: Jan 2002
Posts: 265

This will have the person fill out a form with there name, email and then they can select the map file and sshot to upload. If everything isn't filled out they get errors saying that they must fill out the required fields. All fields in the form a required inorder to upload.

Name this file upload.html
PHP Code:
--------------start upload.html-----------------
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>

<form action="upload.php" method="post" enctype="multipart/form-data">
Please enter your name!<input type="text" name="sender_name"><br>
Please enter your email!<input type="text" name="sender_email"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Select the map to upload! <input type="file" name="userfile"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Select the sshot to upload! <input type="file" name="userfile2"><br>
<input type="submit" value="Upload!">
</form>
</body>
</html>
-------------end upload.html---------- 

Name this file upload.php if changed to anything else you must change the <form action="[b]upload.php[/b]" method="post" enctype="multipart/form-data"> on upload.html
--------------start upload.php-----------------
<?php
// coding by surge
// contact: [email]surge@warjunkies.com[/email]
// please leave this comment

// change "upload/" to the directory you want
if(!(copy($_FILES['userfile']['tmp_name'], "upload/" $_FILES['userfile']['name']))) die("Cannot upload files.");
// change "upload/" to the directory you want
if(!(copy($_FILES['userfile2']['tmp_name'], "upload/" $_FILES['userfile2']['name']))) die("Cannot upload files.");

if(!
$_POST['sender_name']) { 
echo 
'Error ! : No name entered!'
die; 

if(!
$_POST['sender_email']) { 
echo 
'Error ! : No email entered!'
die; 


$mailheaders "From: Contact Form \n";  

$subject "Map Submittion";

// change this to your email
$sendto "your@yourmail.com";

$msg "Sender Name: $_POST[sender_name]\n";
$msg .= "Sender E-Mail: $_POST[sender_email]\n";
$msg .= "Has uploaded their map to the site.\n";

mail($sendto$subject$msg$mailheaders);

echo 
"Thanks $_POST[sender_name]! Upload Complete!";

?>
--------------end upload.php-----------------
__________________
Squad Tag Generator
Take the guessing work out of making you squad tag.
unavailable for re-design

Last edited by Surge; 11-04-2003 at 11:48 AM.
Reply With Quote
  #5  
Old 11-04-2003, 12:14 PM
sob is offline sob
Registered User

Join Date: Apr 2003
Posts: 81

Hey Surge,
Thanks for the reply and code. But I was hopeing for was a mod or hack to the submit download already in place at the site. I already have 300 files and maps in the data base. The admin section of the portal allows me to upload off the desk top a file and SS. But the user submit page will only allow them to upload a file not a SS. Here is a pic of the admin section Here Also you can download the module Here I have mod. it some to show a place for the upload of ss from the desk top but its not functional. If you would come by I can make you a admin. so you can see what I mean. thx
__________________

Last edited by sob; 11-04-2003 at 01:15 PM.
Reply With Quote
  #6  
Old 11-04-2003, 01:03 PM
Surge is offline Surge
Registered User

Join Date: Jan 2002
Posts: 265

pic dosn't show up all the way and the zip file dosn't exist
__________________
Squad Tag Generator
Take the guessing work out of making you squad tag.
unavailable for re-design
Reply With Quote
  #7  
Old 11-04-2003, 01:16 PM
sob is offline sob
Registered User

Join Date: Apr 2003
Posts: 81

Ok the old fashion way lol.
http://www.wyd-hq.com/downloads/mydownloads.zip
http://www.wyd-hq.com/images/download1.jpg
Try that.
__________________
Reply With Quote
  #8  
Old 11-04-2003, 01:26 PM
Surge is offline Surge
Registered User

Join Date: Jan 2002
Posts: 265

ok worked now . Let me play around with it and see if I will beable to modify it for ya
__________________
Squad Tag Generator
Take the guessing work out of making you squad tag.
unavailable for re-design
Reply With Quote
  #9  
Old 11-04-2003, 01:53 PM
sob is offline sob
Registered User

Join Date: Apr 2003
Posts: 81

If you need access to a test website. Let me know I have one not being use.
__________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP+MYSQL Webserver needed Miller Web design and Programming 23 01-13-2006 11:23 PM
Help Needed! Rider Sigs and Graphics 13 06-24-2005 09:55 PM
PHP-NUKE and PHP ~BLÃÐE~ phphq.Net Forums 9 01-19-2005 06:49 AM
Help Needed Reticle General Chat 14 07-01-2004 08:03 PM
elevation help needed Rapid12 Delta Force 1 10-29-2003 02:12 PM


All times are GMT -5. The time now is 04:38 AM.




Powered by vBulletin®