Jump to content


Contact form.


5 replies to this topic

#1 Diaz

    Young Padawan

  • Members
  • Pip
  • 76 posts

Posted 01 June 2007 - 02:31 PM

Ok guys well i've recently been working on a site.

Just finished the contact form using php and it works fine. Does everything.

However theres 1 thing i dont like and thats when for example one of the text fields isnt filled in it displays a message saying

you didnt fill in " whatever" go back and please fill it in etc.

It displays this message using a echo thus looks horrible.. However i was wondering isit possible that when a field is missed it can display and xhtml page that i've formatted to what i like? saying "You've missed a field etc etc" instead of just plain text?

Thanks guys :(

#2 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 01 June 2007 - 02:37 PM

All html is outputted using echo (or other output functions [print, even die/exit]...although technically they are language constructs) so it's not "horrible" because of the method used to output it, it's simply the environment it's outputting it to.

Simply style the page as you would usually, if it's simpler then just include it in an existing layout.

Matt

#3 Diaz

    Young Padawan

  • Members
  • Pip
  • 76 posts

Posted 01 June 2007 - 02:52 PM

http://195.170.173.2...sc/contact.html

Take a look for yourself.. do not enter any info into the contact form. enter submit and it will bring up the page i'm talking about, i just want to know if its possible to format this page?

If so how?

#4 Diaz

    Young Padawan

  • Members
  • Pip
  • 76 posts

Posted 01 June 2007 - 05:51 PM

Sorry its because i've been playing around with it. Try now :)

#5 Diaz

    Young Padawan

  • Members
  • Pip
  • 76 posts

Posted 01 June 2007 - 06:07 PM

Please ignore that adam. That was something i just used whilst doing other bits. If you check back now,. I think you should see what i mean.

:)

#6 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 02 June 2007 - 02:07 PM

Did you even code the contact.php page yourself?

PHP is a language that is meant to be used inline with HTML. Meaning, you can output HTML like you normally would either way.

Just have it output your HTML after validating and doing what it needs with the data submitted.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users