Jump to content

runnerjp

Members
  • Posts

    2,214
  • Joined

  • Last visited

Everything posted by runnerjp

  1. hey guys .. is there a way for a user to upload an image and instead of it going into a file it is sent in a email to myself??
  2. hey hey all rite i made 1 of my files in coffee cup flash form builder but it does not have a upload capability so i made a upload script what i wanna know is how do i put it together? this is the upload script [code]<?php //set where you want to store files //in this example we keep file in folder upload //$HTTP_POST_FILES['ufile']['name']; = upload file name //for example upload file name cartoon.gif . $path will be upload/cartoon.gif $path= "uploads/".$HTTP_POST_FILES['ufile']['name']; if($ufile !=none) { if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path)) { echo "Successful, please read information and you will be took back to the homepage automatically<BR/>"; //$HTTP_POST_FILES['ufile']['name'] = file name //$HTTP_POST_FILES['ufile']['size'] = file size //$HTTP_POST_FILES['ufile']['type'] = type of file echo "File Name :".$HTTP_POST_FILES['ufile']['name']."<BR/>"; echo "File Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>"; echo "File Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>"; echo "<img src=\"$path\" width=\"150\" height=\"150\">"; } else { echo "Error"; } } ?> [/code] and the html on my page [code]<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td><strong>Single File Upload </strong></td> </tr> <tr> <td>Select file <input name="ufile" type="file" id="ufile" size="50" /></td> </tr> <tr> <td align="center"><input type="submit" name="Submit" value="Upload" /></td> </tr> </table> </td> </form> </tr> </table>[/code] wnt let me add other bit :(:(:(:(
  3. hey all i have some files that i could do with putting together , problem is i cant put scripton here because an error occurs so could i send it through email or something to someone plase i wanna put my flash form and upload form together so only 1 send button needs to be hit [a href=\"http://werun2win.com/profile_info.html\" target=\"_blank\"]www.werun2win.com/profile_info.html [/a]
  4. hey guys ok rite here we go i wanan make i file that i can gether info about users via form script but a also want users to be able to upload a picture of themselfs so i can creat a profile about them but here is tricky part i have all ready created a webpage for all this to go on so need to have some sort of html as well :S helllppp lol
  5. ermm no sorry not very good at explanin lol rite i have made a script so ppl can upload files onto my website and put in information so then it emails the info to me but i have allready created a webpage with lkayout n stuff so i got my script on www.werun2win.com/upload2.php and i wanna put it on ww.werun2win.com/profile the site that i have allready made...does that make sence??
  6. how do i use the script i created with html or summats so i can add it to a page i have allready created???
  7. [!--quoteo(post=385384:date=Jun 18 2006, 01:54 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ Jun 18 2006, 01:54 PM) [snapback]385384[/snapback][/div][div class=\'quotemain\'][!--quotec--] again, you aren't being very clear. do you mean that you are wanting to combine several things into a single script? you would have to setup some conditioning, like if (!$_POST) { //echo form } else { //process information } [/quote] sorry rite here is script i made to gather infomation and send it to me in email [code]<? $mailto = 'contact@werun2win.com'; $subject = "werun2win.com"; $formurl = "http://www.werun2win.com/contact.html"; $thankyouurl = "http://www.werun2win.com/thanks.html"; $uself = 0; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n"; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $http_referrer = getenv( "HTTP_REFERER" ); if((!$name=="none")&&($comments=="none")){ echo "Sorry please fill in all the form<br><a href='contact.html'>Please try agin!</a>"; exit; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $name\n" . "Email of sender: $email\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n"; if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$" ,$email)) { echo"please add a correct email address<br><a href='contact.html'>Please try agin!</a>"; exit; }else{ mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit; } ?>[/code] yup rite and i what to add a uploader to that so i can get sent pitures as well with it
  8. [!--quoteo(post=385380:date=Jun 18 2006, 01:48 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ Jun 18 2006, 01:48 PM) [snapback]385380[/snapback][/div][div class=\'quotemain\'][!--quotec--] it depends on what kind of information you want to get from the user. some information, like their browser, ip, etc.. can be grabbed from global variables. For other information (like their email address, name, etc..) you have to make an html form and then you can grab the posted information with php through things like $_POST. [/quote] ahh rite i have created a php script so i can get information about ppl so they fill in text n stuff its just getting them to upload pictures and email it to me on same script i find the problem
  9. [!--quoteo(post=385375:date=Jun 18 2006, 01:39 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Jun 18 2006, 01:39 PM) [snapback]385375[/snapback][/div][div class=\'quotemain\'][!--quotec--] I'm not sure if I fully understand what you are asking. Do you want to know how to get people to your site? I'd suggest actually creating the site first, and then asking that question in a SEO or marketing forum. You can't write some code that attracts surfers to your site... [/quote] noooo write i wanna make a script that like means ppl send me an email with pictures of themselfs in plus information text about them selfs
  10. hey all ok i need some help i wanna make a page on my website where i can put peoples profiles up but i wanna get visitors to my site to upload the info to my site any idea codes ect??
  11. hey all rite here it is i wanna make a email form that i can have ppl email me there info and i picture i have got the form set up for info just need to know what to add to it so they can upload a picture and send it to me.... can any 1 help below is code so far [code]<? $mailto = 'contact@werun2win.com'; $subject = "werun2win.com"; $formurl = "http://www.werun2win.com/contact.html"; $thankyouurl = "http://www.werun2win.com/thanks.html"; $uself = 0; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n"; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $http_referrer = getenv( "HTTP_REFERER" ); if((!$name=="none")&&($comments=="none")){ echo "Sorry please fill in all the form<br><a href='contact.html'>Please try agin!</a>"; exit; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $name\n" . "Email of sender: $email\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n"; if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$" ,$email)) { echo"please add a correct email address<br><a href='contact.html'>Please try agin!</a>"; exit; }else{ mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit; } ?>[/code]
  12. [!--quoteo(post=385050:date=Jun 17 2006, 01:53 PM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 17 2006, 01:53 PM) [snapback]385050[/snapback][/div][div class=\'quotemain\'][!--quotec--] if this forum is a 3rd party forum script then other user will want the same function cheek the forum of the provided script as the code is most proberly made already as a mod. if its your own creation then your have to add a count colum aginst the viewed titles, and then do a select statement outputting the most used title throw the count varable. also you can use the round statement to randomly show high rated titles. [/quote] ok my site is on[a href=\"http://www.werun2win.com/talkalot/\" target=\"_blank\"] [a href=\\\"http://www.werun2win.com/talkalot/\\\" target=\\\"_blank\\\"]http://www.werun2win.com/talkalot/[/a][/a]
  13. runnerjp

    forum

    ok guys iv got a forum all set up but i wanna but i glimps of the hot topics on my main page is there any code that can do this
  14. heyyyy all again ok iv created a script so that people can upload pictures so i can put them on my site so i got this code [code]<? // Where the file is going to be placed $target_path = "uploads/"; /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); // This is how we will get the temporary file... $_FILES['uploadedfile']['tmp_name']; $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } ?>[/code] and i made a empty folder called uploads/ like so.../public_html/uploads/ and placed this javascript on my page [code]<form enctype="multipart/form-data" action="uploader.php" method="POST"> <P ALIGN=LEFT>Upload a screenshot of the error in JPG format maximum file size 100KB (To take a screenshot press PrintScreen button and then Paste into any image / photo program which can save as JPG): <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <input type="hidden" name="FILE_TYPE_ALLOW" value="image/jpeg,image/pjpeg" /> <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form>[/code] yet i tried to upload a picture and it wnt go into my folder i created can any one help?
  15. please can any one help me its very annoying ...
  16. [!--quoteo(post=385002:date=Jun 17 2006, 11:01 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 17 2006, 11:01 AM) [snapback]385002[/snapback][/div][div class=\'quotemain\'][!--quotec--] try this ok [code] <? $mailto = 'contact@werun2win.com'; $subject = "werun2win.com"; $formurl = "http://www.werun2win.com/contact.html"; $thankyouurl = "http://www.werun2win.com/thanks.html"; $uself = 0; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n"; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $http_referrer = getenv( "HTTP_REFERER" ); if((!$name=="none")&&($comments=="none")){ echo "Sorry please fill in all the form<br><a href='what ever form page is called'>Please try agin!</a>": exit; } if (get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $name\n" . "Email of sender: $email\n" . "------------------------- COMMENTS -------------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n"; if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$" ,$email)) { echo"please add a correct email address<br><a href='what ever form page is called.php'>Please try agin!</a>": exit; }else{ mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit; } ?> [/code] [/quote] i inserted it and it says this now Parse error: syntax error, unexpected ':', expecting ',' or ';' in /home/werun2wi/public_html/feedback.php on line 22 do i put the script feedback.php or do i put www.werun2win.com/contact ( this is where user fills out the fields) in the areas u told my to put the adress in?
  17. [!--quoteo(post=384997:date=Jun 17 2006, 10:26 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 17 2006, 10:26 AM) [snapback]384997[/snapback][/div][div class=\'quotemain\'][!--quotec--] eregi for email [code] <? $email="me@me.com"; if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$" ,$email)) { echo"please add a correct email address<br><a href='http://whatever.com'>Please try agin!</a>": exit; }else{ code here when correct............. } ?> [/code] valadate form postings. [code] if(($name=="none")&&($comments=="none")){ echo "Sorry please fill in all the form<br><a href='http://whatever.com'>Please try agin!</a>": exit; } [/code] [/quote] ok where abouts do i add them into my script???
  18. [!--quoteo(post=384996:date=Jun 17 2006, 10:25 AM:name=JP128)--][div class=\'quotetop\']QUOTE(JP128 @ Jun 17 2006, 10:25 AM) [snapback]384996[/snapback][/div][div class=\'quotemain\'][!--quotec--] use this to add in places... example: if(empty($username)){ echo"Fill out the username field."; } if(empty($password)){ echo"Fill out the password field."; } if(empty($email)){ echo"Fill out the email field."; } just add those to check after they click submit [/quote] where about on the script do i put them im new to this sorry
  19. [b]CLOSED BY WILDTEEN88: YOU ALREADY POSTED THIS PROBLEM [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=96137\" target=\"_blank\"]HERE[/a]. PLEASE DO NOT POST MULTIPLE INSTANCES OF THREADS.[/b] hey hey all... ok i have got a form mailer script.... works fine!! but i need to know how do i make all fields recuired so ppl have to fill them in and at the moments you can fill in the email address form with just anything, i want it so you have to put summats@adress.com [code]*/ // ------------- CONFIGURABLE SECTION ------------------------ // $mailto - set to the email address you want the form // sent to, eg //$mailto        = "youremailaddress@example.com"; $mailto = 'contact@werun2win.com'; // $subject - set to the Subject line of the email, eg //$subject    = "Feedback Form"; $subject = "werun2win.com"; // the pages to be displayed, eg //$formurl        = ""; //$errorurl        = ""; //$thankyouurl    = ""; $formurl = "http://www.werun2win.com/contact.html"; $errorurl = "http://www.werun2win.com/error.html"; $thankyouurl = "http://www.werun2win.com/thanks.html"; $uself = 0; // -------------------- END OF CONFIGURABLE SECTION --------------- $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n"; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) {     header( "Location: $formurl" );     exit; } if (empty($name) || empty($email) || empty($comments)) {    header( "Location: $errorurl" );    exit; } if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {     header( "Location: $errorurl" );     exit; } if (get_magic_quotes_gpc()) {     $comments = stripslashes( $comments ); } $messageproper =     "This message was sent from:\n" .     "$http_referrer\n" .     "------------------------------------------------------------\n" .     "Name of sender: $name\n" .     "Email of sender: $email\n" .     "------------------------- COMMENTS -------------------------\n\n" .     $comments .     "\n\n------------------------------------------------------------\n"; mail($mailto, $subject, $messageproper,     "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header("Location: http://www.werun2win.com/thanks.html"); exit; ?>[/code]
  20. OK I HAVE GOT 1 MORE QUESTION ok i want to make it so people have to fill in all the fields and in the email section it has to be a @ email address you saw how easy it was by putting test in it just to put anything do you know of a way i can do this??
  21. sweet ...thanks for all your help... if i get stuck again with anything would it be ok if i contacted you?
  22. at least it works...thanks loads for your help...just woundering 1 more thing i want to add a fileupload part so people can send me pictures of them self so i can creat profiles of them... will it be hard adding i think so i can upload pictures???
  23. did you...how comes on my computer i gt sent to the .php page??
  24. [!--quoteo(post=384977:date=Jun 17 2006, 09:35 AM:name=aebstract)--][div class=\'quotetop\']QUOTE(aebstract @ Jun 17 2006, 09:35 AM) [snapback]384977[/snapback][/div][div class=\'quotemain\'][!--quotec--] change header( "Location: $thankyouurl" ); to header("Location: [a href=\"http://www.werun2win.com/thanks.html");\" target=\"_blank\"]http://www.werun2win.com/thanks.html");[/a] [/quote] i tried it and it didnt seem to work if u need to look at the website and what it does go [a href=\"http://www.werun2win.com/contact.html\" target=\"_blank\"]here[/a] have i not enterd the php script into the system right or summats ?? i put it itno the public_html file where the contact page i made is...is that right??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.