Jump to content

hsncool

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hsncool's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. you have errors all over that thingg!!! im going to try and see how many i can fynd, hehe!! okies, [b]mail.htm[/b] no body tags! also, why are u using <!-- --> 's ??? use [b]action="sendmail.php"[/b] [b]sendmail.php[/b] if you do use the sender part of ur form, and name it sender..., u can doo ur code like this, and it should work... [code] <html> <head> <title>[b]sendmail[/b]</title> </head> [b]<body>[/b] <? $to = $_POST['email']; $sender = $_POST['sender']; $subject = $_POST['subject']; $message = $_POST['message'] ; $email_to = $sender . "<" . $to . ">" mail($email_to,$subject,$message,"From:my@email.com\n");     echo "finished!"; ?> [b]</body>[/b] </html> [/code] shud work, tell me if dusnt
  2. ill be very nice to you, and quickly make u a script to do this... here goess.... [code]<? // EDIT HERE!!! $file = "HERE"; // change HERE to the file you wish to be downloaded. do not include the csv extension. //NO NEED TO EDIT BELOW THIS LINE!!!!! echo('<a href="?">start page</a><br /><br />'); $action=$_GET['download']; $ext = '.csv'; $filename=$_GET['filename']; if(!$action == true) { echo('<form action="?" method="get"> <input name="download" type="hidden" value="true" /><br /> Filename: <input name="filename" type="text" /> - this is the filename you wish the download to have, without the extension<br /> <input name="" type="submit" value="Download!!" /> </form>'); } else { $download = $file . $ext; $name = $filename . $ext; if(file_exists("$download")) { header("Content-type: application/force-download"); header ("Content-Length: ".filesize($download)); header("Content-Disposition: attachment; filename=$name"); @readfile("$download"); } else { echo('no such file'); } exit; } ?>[/code] i havnt tested this, if it has any probs, please tell mee, and ill correct em.
  3. ooo, it workedd!!! :D thanx mate!!. are there any other useful headers that can be used ??, like, for example, changing the text in the title bar of the download box, which the new Windows Live Mail uses, with attatchment downloads. or anything elsee ??
  4. hi. i dont kno much abt headers, but sum1 gave me a small script to let me make any file download, even html or jpg's, that would normally just open in the browser... the script goes something lyk this... [code] <?php $file=$_GET['file']; $filename=$_GET['filename']; if(file_exists("$file")) { header("Content-type: application/force-download"); header("Content-Disposition: attachment; filename=$filename"); @readfile("$file"); } exit; ?> [/code] ...where "www.haha.com/?file=<X>&filename=<Z>" is the filename of the download... the problem i am having, is that wen i use the script, the browser nev r knows how large the file is, and is unable to produce an ETA because of this. i was wondering how it could b edited to enable this, or a new script that can do the same job. thanx
  5. OMGOSH! U GUYS HAV TO DO EVRYTHING THE HARDWAY DONT U! lol, all u gota do is insert this code into ur script..... [code]echo('&lt;a href=&quot;http://www.mypage.com/index.php?id=' . $id . '&quot;&lt;img src=&quot;http://www.mypage.com/bnt-logo.png&quot;&lt;/a&gt;');[/code] [b]how i did this ?[/b] put wat u want to b display in the "design" part of a blank dreamweaver doc, and then check what the code for it is! easy!
  6. [!--quoteo(post=389231:date=Jun 29 2006, 01:42 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Jun 29 2006, 01:42 PM) [snapback]389231[/snapback][/div][div class=\'quotemain\'][!--quotec--] as for the comment about the .html vs. .php, it is possible to have your server parse HTML pages as PHP so that you can name all your pages HTML, but you have to modify your server configuration files, so it's usually not recommended to do so. [/quote] yeh, thats true... if u have access to your servers httpd.conf file, u just have to add this line... [code]AddType application/x-httpd-php .php .html[/code] ...the chances are, u've already got the "application/x-httpd-php .php" part of that line, so just add a ".html" to the end. BUT, u all heard obsidian say "but you have to modify your server configuration files, so it's usually not recommended to do so." but this isnt nesesarily true. simply create a text file named ".htaccess" and add that same line into that. this will give you the same effect without doing any server modifications. u'll have to put this file into evry dir that u have pages in.
×
×
  • 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.