PHP and XAMPP


#1

good morning, i am new to the world of web design and am doing this is purely interest level and not for financial gain. ok so im muddling along quite nicely with HTML and now CSS with my style sheets. i am building a website with all the usual attributes - images information links navigation and contact forms. i have hit a snag in the contact form side. i want to test my page client aide (knowing that the php file must be server side) i have installed xampp to my mac and tested by creating a hello world php file and run it in localhost all good my question is two fold,

  1. how do i set up my website files ie do i put just the php in the htdocs or all of the website? do i need to refernece the xampp in my html page?

  2. how can i test my contact form as the site is not live, am i able to do this in local host?

i am new to this and do not speak jargon or understand web speak too much ha ha

any help would be most gratefully recieved…


#2

Just bang it all in httpdocs/test or whatever, there’s no need to reference xampp. A basic (and never-fail) way to test form submission is to direct the form to a dummy.php file that simply parses and echo’s your POST data while you’re working on it. You’ll see immediately if any POST or SESSION data is incorrect and/or via PHP errors if something is not quite right.