A little help please with PHP and a contact form

Hi all

I have a bit of a problem with a contact form I have on one of my client sites. I executed the form of a simple .php for the details of the form by e-mail to the customer. Validation of spy, I added in the email text box making it must have of ' @ 'and'.' completed. We shouldn't need more.

The thing is that my client gets a lot of blank form returned to him, I find something to do with sitelock.com because that is where the I.Ps back. My guess, and as a beginner enough, apologies if I'm wrong, is that the security of locking the site scans the php file that sends of course.

I did some research and it is clear that I need a side validation server in the php file, and I think that not mistaken in thinking that he needs the function "preg_match". I'm not very well informed about php at the moment but I need to solve this problem quickly, so I was wondering if any of you would be kind enough to show me exactly what code should I add to the php form to require the same ' @ 'and'.' validation as stated in the html file.

I've added details of the php file below and thank you very much in advance for any help given.

Jeff

<? PHP

/ * Email * /.

$emailSubject = "nursery firm Reservations."
$webMaster = ' [email protected] ';

/ * Collection of data Variables * /.

$title = $_POST ["title"];
$surname = $_POST ['name'];
$initials = $_POST ['name'];
$street1 = $_POST ["street1"];
$street2 = $_POST ['street.2"];
$town = $_POST ['city'];
$postcode = $_POST ['postal code'];
$dayphone = $_POST ['dayphone'];
$mobile = $_POST ['mobile'];
$email = $_POST ['email'];
$typeofpet = $_POST ['typeofpet'];
$petother = $_POST ['petother'];
$comments = $_POST ['comment'];

$body = < < < NEM
Title: $title
Name: $surname
Acronym: $initials
Street one: $street1
Two streets: $street2
City: $town
Postal code: $postcode
Phone during the day: $dayphone
Mobile: $mobile
E-mail: $email
Type of Pet $typeofpet
Other pets: $petother
Comments: $comments
NEM;


$headers = "from: $email\r\n";
$headers. = "content = type: type/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);

Add this at the top of your file before your block of PHP-

Then add this at the bottom of the file-

In other words, if the file is executed without a header $_POST that contains your submit button, nothing will happen.

Tags: Dreamweaver

Similar Questions

  • NB100 help please with fan and graphics settings

    Hi, I just bought the NB100 and have a few questions, I hope someone can help me with.
    The fan icon goes grey or white according to the parameters by using FN and F6, but I can't feel any difference in the air around the grid on the right. It is on when the icon shows white or gray? Does really?
    My second question is about the graphics settings. The intel power option that appears when the icon in the taskbar graphivs is double clicked seems to be disabled. There are automatic brightness sliders and energy saving, but none can be selected, how is it permits?
    My last question is about the games. I tried a few alumni who were not graphic intensive, Deus Ex and the sins of a solar empire, but I had problems in the text boxes that require a response, and in the case of Deus Ex, they say that the graphics drivers are not compatible. Has anyone got Ant with games? I travel a lot and thinking, I want to have one or two other than playing cards installed etc.

    Thanks and regards, Brian

    On my machine that F6 is to mute sound, F8 is for the cooling fan. Based on this fact the fan speed change.
    I can't help with the power settings, like mine all seem to work OK and I can make changes.
    Have you tried changing the settings through preferences/system/Power Management?

  • Weird effect with image and sliding contact form.

    Hello

    I ran into a strange problem. I used the widget simple form at the bottom of my home page. I placed that form over a picture I did in Photoshop. With a few manipulations and rearranging the fields in the contact form, I placed the corresponding areas of my image of contact form. See the image below:

    what-it-looks-like.png

    Here's my problem comes in. When I saw the site in my browser and that I have scroll down to the footer, the image of the contact form the blades on the left side of the browser and stops in a strange position on the screen. Like this:

    what-it-does.png

    What I am doing wrong? What Miss me. I tried to place the image as a fill for the form. I tried to put the widget below the image (I know it does not work, but I tried everything I can think of). I tried to put the widget on a separate layer. Tried to move this layer below all the rest... once again, I know that wouldn't work, but trying to everything.

    I'm relatively new to Muse, but I'm picking up pretty quickly and have not had a problem with anything else I've done... Well, except for my theme everything is thrown between what looks like the Muse what it looks like in the browser. that is, if you look at the top image, the area where the contact footer and the "what's NEW" is, he crossed the gap between the green bars on each side. In the bottom image there is a gap between the edges of the box and said green bars.

    Please, if anyone has a suggestion or a solution, I would be eternally grateful. And if you can tell me what I am doing wrong with my experience and the elements of the image, I placed... Well that would be just a big old bonus!

    Thanks in advance for any help you are able to throw my way.

    Have you applied scrolling to form? If I understand what page scrolls down, then shape moves to the post? This may be due to the movement of scrolling applied to the form.

    Try to remove the scrolling and then check out.

    Thank you

    Sanjit

  • Little help please with RV082!

    I just bought the RV082 as a solution for a company that needed a router that can take over a pretty decent firewall and vpn connections.

    I have an ADSL connection with a Zyxel P660D router and I tried to adjust my Zyxel router to work in Bridge mode and disabled the NAT, Firewall and other services so that it works as a modem and the RV082 serves as router and gateway for the company.

    The company has a dynamic IP and I put the RV082 on obtain an IP address automatically, but what I get is a private IP address, I shouldn't get a public IP address on the RV082 WAN interface? And shouldn't the RV082 be the entry door to all workstations in the company?

    Any help or advice would be appreciated.

    Thanks in advance,

    Simon

    Could be an MTU problem. Set you the MTU on the router for your DSL connection? See here for more details.

  • A little help please with a formula

    I am new to spreadsheets, so my knowledge is VERY limited.

    However, I did my first spreadsheet in numbers for a construction project and I'm starting to see how powerful and useful it can be.

    In my list of expenses, I have sometimes recurring elements such as 'Jumps' (disposal for those who do not know what they are)
    Until then I got three points jump in my column A (which lists ALL expenses), but I expect many others.

    In column B, I put the costs.

    I would like to create a separate table that amounts to a cost of running everything that appears in column B that is bound to an element in A column that contains the word "Skip".

    Who is?

    I know this must be possible but don't have a clue how to do it.

    Any help appreciated.

    Thank you

    Hi David,

    You can try something like that.

    The formula is:

    = SUMIF(Data::A,"*Skip*",Data::B)

    The * are 'wild '.  Has anything in the column that contains 'jump' is going to be counted.

    SG

  • Save my Clip Positions of film with PHP and MySQL

    Hello

    I created a video (FLV) Player, who just plays my videos. Everything works fine and I would like to add a new button to save the position according to which the film played up to. So I can come back later and have the opportunity to play the film to the point that the last time he was arrested. Therefore, I need to save my Clip Positions of film with PHP and MySQL.

    So far, I created a button that saves the position of the my video clip "ns.time' in a variable. I'm currently just display this variable, but I need to export to my file PHP where it gets sorted to be sent to mySQL database. Could you tell m e how can be down or where I can find more material (tutorial) to achieve this.

    I tried to export using 'getURL(url,window,method)' that points to my PHP file. But for some reason any when he sends some information to my php and not only the Position of Movie Clip. I realized from the address line that attempts to send millions of movie flow information, etc..

    I realized that Flash tries to send information of my Listbox and trees which are the list of film clips I have. I don't know why he's trying to send this information! Is anyway I can stop the Flash to send information to my PHP file and send only the value of my a Variable?

    Here's how I send the value of the Variable entry in the PHP file...

    getURL (" http://www.myDomainName.com/aishopper/test2/matrix.php","", "GET" ");

    Thank you so much and have a great day.

    Babak

    Hello JayCharles,

    Thanks for your suggestion. You are absolutely correct, and made me aware of the error I made. I used your suggestion and it has worked very well. Once again, thank YOU for your help.

    See you soon,.

    Babak: o).

  • Hi help me with drag and drop with as3 if you please

    Hello friends,

    I am a newbie to as3 in flash and had a prob with drag and drop features

    var dragArray:Array = [square_word, circle_word, triangle_word];

    var matchArray:Array = [squareMatch, circleMatch, triangleMatch];

    var posArray:Array = [{x: 276, y: 207}, {x: 443, y: 207}, {x: 107, y: 207}];

    var currentClip:MovieClip;

    var startX:Number;

    var startY: number;

    for (var i: int = 0; i < dragArray.length; i ++) {}

    dragArray [i] .buttonMode = true;

    dragArray [i] .addEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    matchArray [i] .alpha = 0.2;

    }

    function item_onMouseDown(event:MouseEvent):void {}

    currentClip = MovieClip (event.currentTarget);

    startX = currentClip.x;

    startY = currentClip.y;

    addChild (currentClip); bring to front

    currentClip.startDrag ();

    stage.addEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    }

    function stage_onMouseUp(event:MouseEvent):void {}

    stage.removeEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    currentClip.stopDrag ();

    var int index = dragArray.indexOf (currentClip);

    var matchClip:MovieClip = MovieClip (matchArray [index]);

    If (matchClip.hitTestPoint (currentClip.x, currentClip.y, true)) {}

    a match was found. Position the clip using the values of posArray:

    currentClip.x = posArray [index] .x;

    currentClip.y = there posArray [index];

    make not draggable:

    currentClip.removeEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    currentClip.buttonMode = false;

    } else {}

    football match has not, so send the clip to the back where he began:

    currentClip.x = startX;

    currentClip.y = startY;

    }

    in this code, that I'm not the subject abruptly to its original position if he fell into a movieclip wrong (as we should have the availability of droping the drag square circle alse object) and then we should have a button to check if everything is correctly matched, if not after clicking another button 'correctitself', we should get the good objects droping on correct locations automatically

    Please help with any suggestions ASAP

    }

    assign your listener matchall checkAllMatchF and use button:

    var dragArray:Array = [square_word, circle_word, triangle_word];

    var matchArray:Array = [squareMatch, circleMatch, triangleMatch];

    var posArray:Array = [{x: 276, y: 207}, {x: 443, y: 207}, {x: 107, y: 207}];

    var currentClip:MovieClip;

    var startX:Number;

    var startY: number;

    for (var i: int = 0; i< dragarray.length;="" i++)="">

    dragArray [i] .buttonMode = true;

    dragArray [i] .addEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    matchArray [i] .alpha = 0.2;

    }

    function item_onMouseDown(event:MouseEvent):void {}

    currentClip = MovieClip (event.currentTarget);

    startX = currentClip.x;

    startY = currentClip.y;

    addChild (currentClip); bring to front

    currentClip.startDrag ();

    stage.addEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    }

    function stage_onMouseUp(event:MouseEvent):void {}

    stage.removeEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    currentClip.stopDrag ();

    var int index = dragArray.indexOf (currentClip);

    var matchClip:MovieClip = MovieClip (matchArray [index]);

    If (matchClip.hitTestPoint (currentClip.x, currentClip.y, true)) {}

    a match was found. Position the clip using the values of posArray:

    currentClip.x = posArray [index] .x;

    currentClip.y = there posArray [index];

    make not draggable:

    currentClip.removeEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    currentClip.buttonMode = false;

    } else {}

    football match has not, so send the clip to the back where he began:

    currentClip.x = startX;

    currentClip.y = startY;

    }

    }

    function checkAllMatchF (): Boolean {}

    for (var i: int = 0; i<>

    If (dragArray [i] .x! = matchArray [i] .x | dragArray [i] there! = matchArray [i] there) {}

    Returns false;

    }

    }

    Returns true;

    }

  • Help please with BSOD

    BSOD desktop computer:

    "The problem seems to be caused by the following file: TDI." SYS PAGE_FAULT_IN_NONPAGED_AREA technical information: STOP: 0 x 00000050 0xB9F6A1D0, 0 x 00000001 0xB9c5of4A TDI 0x00000000. SYS address B9c5of4A base at B9c50000, Date Stamp 48025834 physical memory dump complete. »

    What should do?

    We need the DMP file because it contains the single record of the sequence of events that led to the accident, what drivers have been loaded, and what has been loaded.

    If you are overclocking STOP

    You may be able to get the DMP files without crashing by booting in SafeMode (F8) with networking.

    Please follow the instructions for posting at this link

    To allow us to help you with symptoms BSOD on your computer, download the contents of your folder "\Windows\Minidump".

    The procedure:

    * Copy the contents of \Windows\Minidump to another location (temporary) somewhere on your machine.
    * Zip up the contents of this folder
    Please, upload to skydrive or a file sharing service and put a link to them in your next post.

    To ensure the minidumps are enabled:

    * Click Start, in the search box, type: sysdm.cpl, press ENTER.
    * On the Advanced tab, click Startup and recovery... Settings button.
    * Make sure that automatically restart is unchecked.
    * Under the writing debugging information header, select image partial memory (256 KB) in the list box drop-down (varies from 256kb).
    * Ensure to that small Dump Directory is listed as % systemroot%\Minidump.
    * OK your way out.
    * Reboot if changes have been made.

    http://www.SysNative.com/forums/showthread.php/325-BSODs-but-no-dump-files

    http://www.osronline.com/article.cfm?article=545

  • Help please with header/footer includes

    Can someone please help with an easy to follow the answer?

    I'm building a site and want to use the header and footer as include files for easier maintenance of the links. In the header, navigation is graphics reversal. (I mention this because there is a problem with the paths of the image). I was able to get understands it appears and works, but my problem is that I want to use subfolders and here, I'm going along in circles. Graphical navigation is visible at the level of the root only.

    The structure of my site goes like this:

    Root has index.php and a few other pages, plus directories following, css, images, includes (containing my header.php and footer.php), subfolder1 (containing the index.php) and subfolder2 (containing index.php).

    The navigation works at the root level but not at the high school level. I tried to use the document and the location of links... / and / and / paths, but I cannot understand this.

    My navigation is WELCOME. SUBFOLDER1 | SUBFOLDER2. CONTACT | LINKS. Hope this is clear.

    If you want to PM me with your email and that you think it might help, I can send you one of my files and the file I use for inclusion so that you can see what works for me?

    Martin

  • HELP PLEASE WITH MY WIRELESS NETWORK CARD CONSTANTLY HAVE TO BE SET

    I have an Acer Aspire 5552-3691 with Atheros AR5B97 wireless adapter. It shows that I have an internet connection, but I have to constantly run network diagnostics it resets then the wireless network adapter and which solves the problem. However, the fix is only short it can last 2 minutes or if I'm lucky 15 but nevertheless it continues to occur. Help, please

    Hello

    Thanks for posting your question in the Microsoft Community forum.

    Refer to this article and let us know the status.

    Problems in Windows wireless and wired network connection: http://windows.microsoft.com/en-US/windows/help/wired-and-wireless-network-connection-problems-in-windows

    Thank you.

  • Muse work with PHP and MySQL

    I have an investigation designed to go to a page of a site.  The designer will be using PHP and MySQL.  Compatible?

    Thanks for any help.

    SS

    Not really relevant. Whatever your designer will do will have to be inserted manually in HTML customized or by editing the HTML files published one way or another. It has nothing to do any with the Muse herself and the design of the process beyond 'make room', i.e. respective free addition where the code can be inserted.

    Mylenium

  • Help please with the addition of a Section of the video

    I created a video for a school organization. Have completed a section or scene, I would like to add more scenes before this scene. I know how to add things, but I don't want to start adding videos and pictures and then my audio may not be in the same place. Is it possible to add without the pictures and audio are out of sync? Can I connect the audio to the video? Help, please. Thank you!

    I guess that you do not want audio move with the clip with the fact that it is already synchronized. In this case select the video and the audio clip, right click and select "link Audio and video.

    See you soon,.

    --

    Neale

    Insanity is hereditary, get you your children

  • Help please with flash CS4!

    Hello, I'm at school and I have a mission to fulfil on flash, but when I try to make an object, a little boring box appears around my object instead of having nothing around him, I spend it for nothing and tried to use the selection tool, but then it didn't go all graph as it should be, and instead This box is back.  Ignored, even once, I tried to use the BONE tool, but it only works on a single shape, and he's not going to others to link!  untitled.JPG This is what looks like the box on the object and it's really frustrating me.  Help, please!

    You have selected the tool "object drawing". In your toolbar to the bottom, there is a button that is just a circle (go over it and it will say "drawing object" (it's under your color palette paint COP and above the fill lock button.) Provide your sounds like mine! Just click on this issue and it will switch the drawing of the object on and outside. You can break apart objects that you have already established as objects by selecting the form and pressing 'cmd' + 'B' (ctrl + b on a pc)

  • Can anyone help please with Javascript. 2 small problems.

    Hello. I created a dynamic PDF form with fields. I have 2 problems that I don't know that someone can help me with. (Someone I can email this PDF on request).

    PROBLEM 1. In this form, I have a table (in fact I think that it is a form of sub) which has 3 buttons associated with it ('Add Row', 'Delete Row' and (line Clear').) A single button adds a new line. It works, but effectively, it duplicates the line (and all the fields/cells of text contained in the line) and this new line at the bottom of any existing lines. What I'm asking, is for this button (the button gets duplicated with the line) to place the new line immediately below the line where it is clicked. That is to say, imagine you open the document, complete line (at this stage it is only) and click on the button 'Add Row '. You now have 2 rows (large), while you complete the second row. Now, here's my problem, if you press the button "Add a line" on the first line, a new 3rd line is added at the bottom and not between line 1 and line 2.

    Actually if you have dozens of lines filled and you need to insert a line of amendment, currently it is impossible without deleting all the lines to the point where you want to check/insert.

    PROBLEM 2. In this line of alphanumeric text, the are two fields (called "Rate" and "Loading") where dollar amounts are entered. As the form is filled (lines can be generated dynamically and there fields filled out manually by the user) there may be potentially dozens of lines in a completed form and, as each line has several fields of alphanumeric text, one can imagine of forming columns once there is more than 1 line. At the end of the form, the totals are automatically calculated. I created a button to reset (clear) all amounts in these two specific areas (columns), but in all ranks. Unfortunately there is something wrong with my script syntax like this button does not. (I want this facility as the end of the form, which is a draft budget, I need to send two copies - one accountants with numbers and logistics and a second copy to another Department that I don't want to give the figures, so I need the key to clear the numbers without having to erase each cell individually).

    Any help that anyone can give would be much appreciated.

    Please send me an email to

    [email protected] If you want I send you the file.

    See you soon

    Bradd

    Send the form to

    [email protected] and I will give it a go... include a reference back to this forum announcement.

    Paul

  • help please with Oregon

    Hi, I have a bunch of logos in a file and animate with Oregon, so I create a timer to show (fade in - fade) logos one by one;

    I had already melted all the logos with alpha = 0; but don t an idea on how to call it inside the Oregon function. My all the logos are called logo1, logo2, logo3 etc and I try to create a variable to contain a certain number and them put the first part of the name (logo) + the variable to call the movieclip but it didn t work. Please if someone could help me with this problem.

    This variable contain the 2nd part of the name

    var logoContador:Number = 1;
    var miTimer:Timer = new Timer (3000);
    miTimer.addEventListener (TimerEvent.TIMER, goTimer);
    function goTimer(TimerEvent:Event):void
    {
    Tweener.addTween(logo+logoContador,{alpha:1,time:1,transition:"easeInQuad",});)

    Tweener.addTween (logo + logoContador, {alpha: 0, time: 1, delay: 1.7, transition: "easeInQuad,"});

    logoContador ++

    }
    miTimer.start ();

    I'm not familiar with the help of Tweener, but just before the last brace, you have a comma.  So maybe that's your problem... you have a comma in there too or you are missing the last parameter which must follow the comma.

Maybe you are looking for

  • I just got a popup warning me that my computer is now infected with a virus.

    Here's what just appeared on my iMac computer screen. Is it this? I thought that this could not happen to Apple. I have an iMac 21.5 with the last update of El Capitan 10.11.6. Any ideas.

  • Satellite M30-604 will not write on DVD

    I've been sucessfully copy data to a CD with Nero in the past and decided to try to copy to a Verbatim 4 x certified DVD - RW and have no chance (says the 'negative' RW was compatible with Tosh). Tried in Nero but it gets stuck on "waiting for the dr

  • NVIDIA GeForce GT 85 - error code 43

    I'm not trusting Microsoft more like today I installed an update for the graphics card NVIDIA GeForce GT 85 and stopped Vista map function with error 43.  I never install optional updates and will buy a Mac computer next time I get a new computer.  I

  • HP notebook G70 - keyboard and Touchpad problems

    Keyboard and Touchpad not working not after that I had to reset my laptop to factory settings after serious a virus put hand on laptop. I managed to make the keyboard work via help but as soon as windows update "updates" it makes my keyboard does not

  • HP 8500 has more, HP for OSX Cougar utility?

    Hello Did a clean install of Mountain Lion, so I lost the HP utility software. The HP Web site has not updated for my model and OSX Mountain Lion. Is there a predictable time when released this software? I am able to print and scan after adding the p