Jump to content

scotttyz

Members
  • Posts

    128
  • Joined

  • Last visited

Everything posted by scotttyz

  1. What I have done on most of the sites I have worked on is to "hard-code" the mailto: line into the form processing script and leave it out of the HTML page completely. That way no mining of emails.
  2. OMFGROFLCOPTER, so simple changes below works great (if I retyped right)
  3. Long time no post Having a problem getting this to work and I was wondering if this is a permissions related issue on TCH. Finishing up a inventory listing for a site selling used bikes. No sales from site, just an inventory list. Currently working on the "admin area" to add a new bike to the database. There are 2 pictures being uploaded with each bike. Using a form page to add new records: (NOTE: form works and adds records fine sans file upload) Sniped code ><form action="my_script.php" enctype="multipart/form-data" method="POST" onsubmit="return validate_form(this)" name="addBikeForm"> <tr> <td class="formgr">Upload/thumbnails<br>200x150 px </td> <td class="formgl"> <input type="file" name="pic_small"></td> </tr> <tr> <td class="formgr">Upload/Images<br>400x300 px </td> <td class="formgl"> <input type="file" name="pic_big"></td> </tr> <input type="submit" value="Add Bike"> <input type="reset" value="Reset Form"> and the php script: ><?php // lets link up :) $statusLinkID = mysql_connect("localhost", "XXXXXXXXXXX", "XXXXXXXXX") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("XXXXXXXXXX", $statusLinkID); //lets write this bad boy $enter_base_record = mysql_query("INSERT INTO bikes (class, manu_id, sell_price, cc, year, model, miles, notes) VALUES ('$class', '$manu_id', '$sell_price', '$cc', '$year', '$model', '$miles', '$notes')", $statusLinkID); if ($enter_base_record != TRUE) {die ('I cannot enter the base record because: ' . mysql_error() . '.');} // Record Number $lastEntry = mysql_insert_id($statusLinkID); // do the file move and rename thing if ($HTTP_POST_FILES['pic_small']['size'] <=0) {die ('Hi, you forgot to put in a small pic or it did not upload corectly. Please delete record number '. $lastEntry . ' completely and renter.');} else { copy($HTTP_POST_FILES['pic_small']['tmp_name'],"/home/hilmuam/public_html/selling/bikes/".$HTTP_POST_FILES['pic_small']['bike_'. $lastEntry. '_sm']);} if ($HTTP_POST_FILES['pic_big']['size'] <=0) {die ('Hi, you forgot to put in a big pic or it did not upload corectly. Please delete record number '. $lastEntry . ' completely and renter.');} else { copy($HTTP_POST_FILES['pic_big']['tmp_name'],"/home/hilmuam/public_html/selling/bikes/".$HTTP_POST_FILES['pic_big']['bike_'. $lastEntry. '_bg']);} // Remove old files AKA clean your sh!t up unlink($HTTP_POST_FILES['pic_small']['tmp_name']); unlink($HTTP_POST_FILES['pic_big']['tmp_name']); // All done go home and open a beer header("Location: add.php"); ?> The errors I am getting ATM are: Warning: copy(/home/XXXXX/public_html/selling/bikes/): failed to open stream: Is a directory in /home/XXXXXX/public_html/admin/admin_add_bike.php on line 14 Warning: copy(/home/XXXXXX/public_html/selling/bikes/): failed to open stream: Is a directory in /home/XXXXXX/public_html/admin/admin_add_bike.php on line 17 Any Ideas?? Alternate ways to get this done? I need to rename the images using the Auto_Inc ID given to Dbase record as it is entered so I can script the front end search
  4. I agree! Slides a c note under the table to Robert as investment
  5. Thanks for the heads up Rock Sign
  6. I am not sure if this is the appropriate place for this, if not please move Is Team speak http://www.teamspeak.org something that can be used on a TCH hosted site? I am working on a site for a friend that is hosted here and this would be a great addition to his site (a bunch of StarWarsGalaxies players)
  7. could you let us know what line is #313 (or whatever line the error is saying) and that will help a ton
  8. the domail name stuff would be answered/set-up by a TCH-**** named board surfer or by ticket. On the set up you could verify the email address exsists in Cpanel and confirm that the form is pointing to the same email. But mostly WELCOME!!! Rock Sign
  9. I had the same problem with TCH without using include or require. My fix was to add >php_value display_errors 1 to the end of the .htaccess in the folder of the offending script. It can be a fairly common error in PHP with many server setups EDIT: BTW I was not setting ANY hedder information in the offending script. I am not " ignoring the error may correct it on-screen"
  10. if all you want to do is keep the URL in the browser "location" as your domain, then have your index.htm(l)/default.htm(l) a frameset and have the frameset load the main page. No reason to have multiple frames in a frame set
  11. I'd be willing to help with the PHP if you cant find what you are looking for.
  12. after the server move I noticed the stats have changes to Webalizer instead of the AWStats that was on 58. Is this a planned change? Or is the server going to be switched over to AWStats?
  13. I am looking to use a shared SSL for a private section of my site as we are going to be trasmitting a ton of confidential information. Will the "this certificate is not from the originating domain" appear every time you go to the site? or is there an option to always accept. I dont have much exper with shared SSL o btw, incase you don't already know Rock Sign
  14. Hi my name is Scott and i am an OpenSourceAholic. nice to meet you Bill
  15. Yes you can have many forwards from a single email (I do) Just keep adding new ones
  16. Back links = other website that link to your site. When Google indexes other sites they follow the links to your site. The more sites indexed by google that have the "back links" to your site the better rank you will get. The redirect can have a higher PR than the acuall page if all of the back links are to the redirect
  17. No problem And if you were to have each new comment added on a new line in the text file you could use the following to make each of the text files lines appear as seperate lines in HTML (adding the <br>'s for you) modified from htpasswd.class.php this willl read the file into a variable >// set up variables $filename = "test.txt"; $SplitContents = array(); // let see if we can read $ReadFile = fopen( $filename, "r" ); // if not empty then lets do something with the file if(empty($ReadFile)) { Print("File is empty, Danger Will Robinson"); exit; } //make variable and put in contents $contents = fread( $ReadFile, filesize( $filename ) ); fclose( $ReadFile ); // this will make each line in the text file apear as an array element $SplitContents = split("\n",$contents); and then you could print it out like..... >//set up to move thru each array element for($count=0;$count<count($SplitContents);$count++) // print out the current line {print $SplitContents[$count] . "<br> <br>";} I have not "run" the code but it should work. You could make an easy PHP page to add a new line to the text file using a form and something like $AddThis = $FormFieldName . "\r\n"; $AppendFile = fopen($filename, "a"); fputs($AppendFile, $AddThis); fclose($AppendFile); you would need to have 777 i think for the text file (unix permissions) but you have a simple form (password protected??) that the user could just type in some text, click submit and it will be on the next line in the text file.
  18. (if I am guessing right) You are trying to have a way for someone to add text, like a message, to the site. How much formatting are you concerned with? This could be as simple as having a text file that php opens, reads the info into an array and then runs a FOR loop to print out each line in a message. There should be plenty of pre-made scripts that you could use for this. Check out http://www.hotscripts.com/PHP/Scripts_and_...hing/index.html http://php.resourceindex.com/Complete_Scri...tent_Retrieval/ http://php.resourceindex.com/Complete_Scri...ge_Communities/ http://php.resourceindex.com/Complete_Scri...eb_Page_Design/ you should be able to find something in those that will do what you are looking for Rock Sign
  19. if you are familiar with telnet (or similar) you could have outlook closed and try to talk to the outgoing mail server. Or if not, try using outllook express (assuming you are using Outlook for regular mail) set up 1 single account, turn off all send/recieve options, use an inncorect incomming email server and add the correct info to the outgoing server but leave the password blank and try to send an email. Make sure you have not auth'd in a while and if you get the password promt BOOM! auth works
  20. he looks much better in person with his teeth in
  21. That is right on for many mail servers. If you have authenticated recently (a few minutes?) then the authentication will hold for a bit and allow what looks like un-authenticated mail to be sent.
  22. I use NULL myself (acually 1ST Page 200) but I have friends that use, Dreamweaver and GoLive, htey are happy with them. I think most of the larger non-micro$oft editors are pretty good
  23. <<bows respectfully in front of Head Guru>>
×
×
  • Create New...