< td align="left" valign="middle" width="254">< input type="submit" name="submitEmail" value="Send Email">< /td>
< /tr>
< tr>
< td align="right" valign="middle" width="143">
< td align="left" valign="middle" width="254">
< /tr>
< /table>
< /form>

The PHP script
if (!empty($HTTP_POST_VARS))
{
//Check for spammers first
if (eregi("MIME-Version: ",$_POST['youremail'].$_POST['yourname'].
$_POST['yourorganization'].$_POST['comment'])){die('Get out, spammer.');}

$now = date( "D dS M h:m:s" ); // Set these variables according to your details
$toAddress = "***@****.***" ;
$redirect = "contactconfirm.php";
$subject = "Contact Message from BII Website" ;

// Form information.
$formEmail = trim($HTTP_POST_VARS[ 'youremail' ]);
$emailparts=explode("@",$formEmail);
if ($emailparts[1]=="*****.***"){ //Another spammer stop.
die('You seem to be trying to use this form to spam. Stop it.');
}
$formName = trim($HTTP_POST_VARS[ 'yourname' ]);
$formOrg = trim($HTTP_POST_VARS[ 'yourorganization' ]);
$formMessage = trim($HTTP_POST_VARS[ 'comment' ]); // Email message
$message = "Name: " .$formName. "\n" ;
$message .= "Email: " .$formEmail. "\n" ;
$message .="IP Address: ".$REMOTE_ADDR. "\n";
$message .= "Organization:" .$formOrg. "\n" ;
$message .= "Comments:\n" ;
$message .= $formMessage. "\n" ;

$headers="From: \"".$formName."\" <".$formEmail.">\n";

$bMailSent = mail($toAddress, $subject, $message, $headers);
if (!$bMailSent){ echo "Unable to send email"; }
else { header("Location: $redirect"); }

}
?>

Source: http://www.livejournal.com/community/php/380005.html

  • Cross-Site Scripting Vulnerability in Apache mod_imap Module

    Date: 12/16/05 (Java Web)    Keywords: html, web, apache

    A cross-site scripting (XSS) vulnerability has been discovered in the Apache httpd server's mod_imap module which allows remote attackers to inject arbitrary web script or HTML via the Referer when using image maps. Input passed to the image map "Referer" directive in "mod_imap" isn't properly sanitised before being returned to the user. This can be exploited [...]

    Source: http://blog.taragana.com/index.php/archive/cross-site-scripting-vulnerability-in-apache-mod_imap-module/

  • Big list to start

    Date: 12/16/05 (See my site)    Keywords: html

    Well having just joined I though I'd put a big list up.

    This is my portfolio and place for experimenting, so it ends to get a bit messy.
    Confundo.net
    Totally flashed based site, still developing, very much a rush job. I have started using streaming flash FLV's on this site, they are soooo cool
    Alterego.net
    Online shoe store, very simple but it works.. not much else to say really.
    Shoequeen.biz
    Not to everyones taste but of all the sites I have done I think I like this one the best, because I was allowed to be colourful.
    Technokitty.com
    Clothing designer, bit of dhtml in it for the displays, never really got finished.
    srahwattersdesign.com
    Experiment for a DJ, allows streaming of mp3's, eventually the desks will work properly.
    Flash experiment
    A work in progress converting a flash site to HTML, I hated the flash site and have finally persuded them that HTML is a better bet for e-commerce and content management, the original version is Here
    Mazuki.com
    When sites go wrong! I have no excuses for this one...
    When sites go wrong!

    Your thoughts?

    Source: http://www.livejournal.com/community/see_my_site/93088.html

    1. 2 questions

      Date: 12/04/05 (HTML Help)    Keywords: html

      Okay I have 2 questions.

      1. How do you make that little scroll box that you can put html code in and be able to post it on your journal? So I could see <*b*> (minus the *'s) instead of bold.

      2. How can I make it so I can have a seperate link for communities instead of them showing up on my friends page? My last layout was like that, but someone else obviously did it for me.

      Thank you! (I'll leave this entry here incase anyone else has the same questions)

      Source: http://www.livejournal.com/community/htmlhelp/2209192.html

    2. PHP and HTML templating...

      Date: 12/06/05 (PHP Community)    Keywords: php, templates, html

      What sort of projects are out there for making templates w/ PHP? I'm trying to get out of the business of writing sloppy PHP/HTML pages and interested in templating.

      Thanks.

      Source: http://www.livejournal.com/community/php/374894.html

    3. Beginner Question

      Date: 12/06/05 (PHP Community)    Keywords: html, web

      First post here, I've done a fir bit of research into this and still can't work it out.

      I have a form that has a checkbox. What need to happen is that if the box is checked then it needs to redirect to a website and send a mail stating that they person has checked the ticlbox, if not it needs to just send the mail stating that the box has not been checked . The mailing part is fine (I think) it's just the issue with the redirection. I can't seem to get my head around it. I know I should be using the $variable = ( condition ? "value if condition is true" : "value if condition is false" ); string but I'm at a loss of how to do it.

      Basically what the rediection needs to do is what the form below does.


      https://www.paypal.com/cgi-bin/webscr" method="post">





      http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">


      So by ticking the tickybox the mail gets sent with it saying that they've payed via paypal and redirects to the site with the above values intact.

      Head-Desk-Head-Desk-Head-Desk-Head-Desk-Head-Desk

      Anyone help?

      [Edit]

      My mailing script looks somewhat like this atm and works apart from the checkbox.


      $name = $_POST['name'];
      $socname = $_POST['socname'];
      $dob = $_POST['dob'];
      $email = $_POST['email'];
      $telhome = $_POST['telhome'];
      $telwork = $_POST['telwork'];
      $telmob = $_POST['telmob'];
      $add1 = $_POST['add1'];
      $add2 = $_POST['add2'];
      $town = $_POST['town'];
      $postcode = $_POST['postcode'];
      $membership = $_POST['membership'];
      /*if ($_POST["membership"] != "")
      {
      header ("Location: https://www.paypal.com/cgi-bin/webscr" . $_POST["item_name"]);
      }*/
      $to = "xxx@darknetweb.co.uk";
      $re = "Membership Application";
      $msg = "Name: $name
      ";
      $msg .= "Society Name: $socname
      ";
      $msg .= "Date of Birth: $dob
      ";
      $msg .= "E-Mail: $email";
      $msg .= "

      Home Telephone: $telhome
      ";
      $msg .= "Work Telephone: $telwork
      ";
      $msg .= "Mobile Telephone: $telmob";
      $msg .= "

      Address 1: $add1
      ";
      $msg .= "Address 2: $add2
      ";
      $msg .= "Town: $town
      ";
      $msg .= "Postcode: $postcode
      ";
      $msg .= "

      Membership Payed: $membership";
      $headers = "MIME-Version: 1.0\r\n";
      $headers .= "Content-type: text/html;";
      $headers .= " charset=iso-8859-1\r\n";
      $headers .= "From: $email \r\n";
      mail ( $to, $re, $msg, $headers );


      The commented out section is the start of the redirection. I'm still unsure of how to output a True or False value for the checkbox though.

      Source: http://www.livejournal.com/community/php/374611.html

    4. Generator Style

      Date: 12/07/05 (HTML Help)    Keywords: html

      I'm trying to change my journal look a bit. I was hoping to have the width of my journal entries shortened a little, with the header banner on top, and the border a solid black 1px, like this example here? What would be the combined html code for this, please?


      Also, if I were to get the stronger accent of my journal entries to look like this, and then have a header on top, what would someone be able to give me the html for that?

      Appreciate your help. Thank you.

      Source: http://www.livejournal.com/community/htmlhelp/2210929.html

    5. Frames overflow/scrolling

      Date: 12/07/05 (WebDesign)    Keywords: html

      Frames. Frames are evil as we all know, but they still have their uses.

      My company's application requires frames to keep the load down. Unfortunately, this also means that I'm having a couple problems with scrolling in my header frame.

      I've tried the following method:


      That didn't work, so I tried:


      Anyone have any ideas on how to force the frame to stay at 0,0 coordinates?

      -Shade

      PS: Note, XHTML 1.0 frameset

      Source: http://www.livejournal.com/community/webdesign/1027508.html

    6. PHP Forms

      Date: 12/08/05 (PHP Community)    Keywords: php, html, database, web

      Hi, I am sure this is really simple but I am beat and I hope someone can point me in the right direction.

      I have a php program that takes data from a form and puts it into a database. This information can then be edited with a web form as well. The data is displayed in a news page for the web site's visitors. Ok all that is easy. The part I am having a hard time with is the correct way to handle the text. I suppose essentially its like LJ but on a much smaller scale with no comments. A daily news system.

      I can use nl2br() to convert the new lines, but then in the editing window I dont want the user to see it when they are editing. The know nothing about HTML.

      Can you point me to a resource that will explain the correct procedure for handling this? Or just tell me which functions to use.

      Much thanks.

      Source: http://www.livejournal.com/community/php/375861.html

    7. Question?

      Date: 12/09/05 (Computer Geeks)    Keywords: php, html, asp, java

      Anyone know of a way I can have a page that generates links of the contents of the folder? and yes i know if i dont create an index page it will automaticaly generate a templated page with links of the names of the items. The reason that wont due is i need the links to open to a blank target page if i do that to the template then all the folders with no indexs will have the popup window *blank target*

      Oh yeah to make this worse the only languages I can due this in are Java ASP HTML maybe if im lucky DHTML; if this is super easy to do in PHP i will try to get them to install support for it on the server but i doubt it =(

      oh and ill throw in a few bucks if you can get me through this quick =D

      Source: http://www.livejournal.com/community/computergeeks/832059.html

    8. Separate pages for Friends entries and Community entries

      Date: 12/09/05 (HTML Help)    Keywords: html

      Hello,

      I am completely new to this whole code/html thing and I've no idea how to separate my Friends entries from the Community entries. In a post by someone else, a list of links were listed

      http://www.livejournal.com/users/YOURNAME/friends/?show=C for Communities
      http://www.livejournal.com/users/YOURNAME/friends/?show=P for People
      and
      http://www.livejournal.com/users/YOURNAME/friends/?show=Y for Feeds

      but I don't know where to put those or how to put those in my codes.

      If you can help me, that'd be greatly appreciated.

       

      Sorry if this is posted in the wrong place.

      Source: http://www.livejournal.com/community/htmlhelp/2212465.html

    9. Yet another PHP problem (permissions)

      Date: 12/09/05 (WebDesign)    Keywords: php, html

      So I'm slowly working on a script to automate displaying galleries. I've got everything to work except one little thing:

      Basically, in the script, a person creates a directory and uploads their files via FTP. Once this is done they run one of my scripts, which copies the pictures to another directory, after resizing, watermarking, etc. All the part works fine.

      The problem is the script cannot delete the original files once the copying has been done. The problems looks like ownership permissions. I noticed that when the script creates the other directory and files the owner is set to 'nobody'. But when I try to delete the fiels that were uploaded (either by unlink or by using exec() to run del) I get the following error:
      Warning: unlink(admin/upload/viking/060F0835_RT8.jpg): Permission denied in /home/internet/public_html/chanta/galleries/admin/process.php on line 57

      I've tried, through the script, to chmod the files so anyone can work with them, but I get the same Permission denied error.

      I know that I had trouble through FTP deleting the files the script created, so I had to write another little script to delete those files (And dir) if needed.

      Any idea what I can do here? There is always the fallback of having the user delete the uploaded dir via their FTP client, but I'd like to avoid it if at all possible, since htey might be doing a large batch of uploads at one time.

      Source: http://www.livejournal.com/community/webdesign/1028698.html

    10. Question?

      Date: 12/09/05 (WebDesign)    Keywords: php, html, asp, java

      Anyone know of a way I can have a page that generates links of the contents of the folder? and yes i know if i dont create an index page it will automaticaly generate a templated page with links of the names of the items. The reason that wont due is i need the links to open to a blank target page if i do that to the template then all the folders with no indexs will have the popup window *blank target*

      Oh yeah to make this worse the only languages I can due this in are Java ASP HTML maybe if im lucky DHTML; if this is super easy to do in PHP i will try to get them to install support for it on the server but i doubt it =(

      oh and ill throw in a few bucks if you can get me through this quick =D

      Source: http://www.livejournal.com/community/webdesign/1028546.html

    11. How do I get my webpage to look the same on all resolutions?

      Date: 12/10/05 (HTML Help)    Keywords: css, html, web

      Newbie here. *waves*

      So, I've reached absolute last nerve with this. I don't know much about HTML/CSS but I tried to start up a website (HERE. Please ignore my comments. XD) not too long ago. I have a 800x600 resolution and am tryin' to use div layers. I'm tryna make my my website "expand" (like the header an' stuff) for people with larger resolutions. I read somewhere that you set that height an' width to 100%, so that it takes up that amount regardless of the resoulution..but I think that's if you use tables instead of div layers. T__T
      Does anyone know the correct way to do this? Cause I know there's a way..I jus' can't find it. ;_____;


      Any help would be appreciated, seein' as I have a massive lack of skills. T__T

      Source: http://www.livejournal.com/community/htmlhelp/2213550.html

    12. Menus

      Date: 12/10/05 (PHP Community)    Keywords: php, css, html, java

      Hi guys,

      I'm looking at various menu systems for a site I'm working on. I want to avoid DHTML and javascript if possible, sticking to a purely CSS model. So I saw this article (http://htmlfixit.com/?p=808) online, and I liked the end result, but after a second look I've determined it's not what I'm after.

      (http://htmlfixit.com/?p=808 is currenly offline, but the CSS menu they talk about is here: http://www.stormtrumpets.com -- compare with http://www.stormtrumpets.com/trumpets01.html to see how they implement the menu)

      The menu on this page, while purely CSS, appears to be coded individually for each page -- that's find for a site with a limited number of pages, but not practical in terms of scalability.



      What I'm looking for is a way to set one menu across all the pages on my site, and allow the users to expand the menu with a mouse-click (hover is a second acceptible (if not preferred) choice). I don't want to have to create the menu for each page that ends up being on the site.

      I'm happy to use PHP to achieve this, since the site is all PHP-based to begin with.

      x-posted to '[info]'_css and '[info]'php

      Source: http://www.livejournal.com/community/php/377523.html

    13. Image Maps & Frames?

      Date: 12/11/05 (HTML Help)    Keywords: html

      Hi, this is a non-LJ specific question. I'm looking for help regarding putting together an image map and having the links open up in a specified text box (... frames?)

      So, it's kind of like the few links on the image maps like About Me, Entries, Tag (etc) will all open up new windows in the same entry box (i.e. the page does not LOAD another time, just that window loads and shows you different content) I've been told that this is something called iframes (urm) - really, really do require assistance from anyone who can teach me how to code such a #@!@! thing in HTML (most likely for a blogspot account).

      I'm not too nifty with the explanations but I do hope you get the drift, and if you could offer me any direction / assistance at all I would be deeply appreciative. Thank you. ♥ Please contact me at yishhed@gmail.com

      Source: http://www.livejournal.com/community/htmlhelp/2214867.html

    14. Picture code assistance

      Date: 12/12/05 (HTML Help)    Keywords: browser, css, html, web

      Ok, why is this happening?

      Not an expert here, and I know IE is the root of all HTML evil, but I don’t get it.
      All images on my site have a code to be 50x50 pixels, unless they’re of a specific class. ( I use CSS to get this done)

      Fire fox recognizes this, and is fine, displaying my pictures properly.
      IE is a douch and only will size the special pics after a few refreshes.

      Arou?

      Is there something in there that I have to put for the evil IE so that it will display properly the first frappin’ time or am I doomed to preface my site with a “Optimal goodness in any browser other than IE” statement?

      Here’s the site: stephi’s screwed up place

      Thanks!

      X-posted to a few other communities: '[info]'girlgeeks, '[info]'_webdesign_, '[info]'discuss_design, '[info]'htmlhelp, '[info]'site_dev

      Source: http://www.livejournal.com/community/htmlhelp/2216060.html

    15. some good reads...

      Date: 12/14/05 (WebDesign)    Keywords: php, html

      If you are in biznatch for yourself, here are some good articles:

      http://www.strangebrand.com/93/the-first-year-7-lessons-learned.html

      http://37signals.com/svn/archives2/small_biz_101_cash_flow.php
      The tip about chasing invoices the minute they are late is a no brainer but super important.

      Source: http://www.livejournal.com/community/webdesign/1030403.html

    16. Text Encoding Problem

      Date: 12/15/05 (Computer Help)    Keywords: html, web

      I recently installed Japanese as a second language on my computer, because I write some things in Japanese and such. But, this has messed with the text encoding on websites and well, everywhere. The \ is now a Yen symbol and things like that and it's really annoying. I figured out that going to View > Encoding > Western European (Windows) fixes it, but I have to do it for every webpage. And that doesn't help for when I'm coding for my sites in notepad with HTML or something. Is there some way to permanently fix this? =(

      By the way, if it makes a difference, I'm using Windows XP Home.

      Edit Ugh. So changing the encoding apparantly doesn't work anymore either. =/ Help~

      Source: http://www.livejournal.com/community/computer_help/548535.html

    17. gettext()

      Date: 12/15/05 (PHP Community)    Keywords: php, html, linux, apache

      I just can not get gettext() to work! I feel like every article I've read on the subject offers a different way to implement this in a script, but none of them seem to be working for me. If anyone can offer any help, it would be greatly appreciated.



      Server environment(s):
      • Local
        • Server
          • Windows XP Prof SP2
          • Apache 1.3.34
          • PHP 5.0.5 (with the gettext extension enabled)
        • File system
          • BASEDIR: c:\localhost\site\

            internals\lang\ --language file directory
            internals\lang\en\
            internals\lang\en\LC_MESSAGES\messages.mo
            internals\lang\en\LC_MESSAGES\messages.po
            internals\lang\es\
            internals\lang\en\LC_MESSAGES\messages.mo
            internals\lang\es\LC_MESSAGES\messages.po

            public_html\gettext.php --gettext test file
      • Remote
        • Server
          • Linux (not sure of the distro)
          • Apache 1.3.33
          • PHP 4.3.11 --with-gettext
        • File system
          • BASEDIR: /home/username/
            (same as above)





        ------------------------
        public_html\gettext.php
        ------------------------


        putenv ("LANG=es");
        setlocale(LC_ALL, "");

        bindtextdomain ("messages", "c:\localhost\site\internals\lang");
        textdomain ("messages");

        print(gettext ("Hello!"));
        ?>

        ------------------------
        shell commands
        ------------------------

        xgettext -a --omit-header gettext.php

        msgfmt -o messages.mo messages.po

        ------------------------
        internals\lang\en\LC_ MESSAGES\messages.po
        ------------------------

        #: gettext.php:27
        msgid "Hello!"
        msgstr "!olleH"

        ------------------------
        internals\lang\es\LC_ MESSAGES\messages.po
        ------------------------

        #: gettext.php:27
        msgid "Hello!"
        msgstr "Hola!"


        EDIT: I've miraculously and inexplicably gotten the script to work on my local box, but it still won't work on the Linux server. I think it might have something to do with the "putenv("LANG=es"). Is there a different variable that needs to be set? Ideas?
    18. Source: http://www.livejournal.com/community/php/379698.html

    19. Help "locking down" a form

      Date: 12/16/05 (PHP Community)    Keywords: php, html, web, hosting, spam

      Thanks to the responses on the captcha code. I think I know what I can do with it, but as someone pointed out, there will be accessibility problems, which is an issue because the site I'm working on is a gov't site.

      My hosting company says the script to handle the contact form is vulnerable and that I should lock it down. They recommended the captcha method or a "guest" login requirement via .htaccess. I'll look into that, but in the meantime, they mentioned that my handler was "badly coded and allows more than one email address to be added to it." Since I've learned PHP by the seat of my pants, I'm not surprised, but I also don't know what to do to clean it up and make it better. Any help?



      The HTML Form

      < form action="contactmail.php" method="post" name="contact">
      < table width="411" border="0" cellspacing="2" cellpadding="4">
      < tr>
      < td align="right" valign="middle" width="143">
      < p>Your Name:< /p>
      < /td>
      < td align="left" valign="middle" width="254">< input type="text" name="yourname" size="36" tabindex="1">< /td>
      < /tr>
      < tr>
      < td align="right" valign="middle" width="143">
      < p>Your Email:< /p>
      < /td>
      < td align="left" valign="middle" width="254">< input type="text" name="youremail" size="36" tabindex="2">< /td>
      < /tr>
      < tr>
      < td align="right" valign="middle" width="143">
      < p>Your Organization:< /p>
      < /td>
      < td align="left" valign="middle" width="254">< input type="text" name="yourorganization" size="36" tabindex="3">< /td>
      < /tr>
      < tr>
      < td align="right" valign="top" width="143">
      < p>Comment or Question:< /p>
      < /td>
      < td align="left" valign="middle" width="254">< textarea name="comment" rows="17" cols="33" tabindex="4">< /textarea>< /td>
      < /tr>
      < tr>
      < td align="right" valign="middle" width="143">

    Previous page  ||  Next page


    antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home