Simple PHP script calls data from DB

monchi954

New member
Dec 29, 2008
108
2
0
I have form on my LP then I have a congrats page after submit, the form saves the data to a mysql DB and I want to be able to have a php script on my congrats LP that gets the person info from the form.

example

congrats (FIRST NAME) we have 100 in (CITY) .

I understand mysql and php but I do not know how to code, is there like a template I can follow ? can someone point me in the right direction , thank you.
 


Hopefully your submit page has some form validation built in. Assuming it does, you can just echo the validated variables onto your congrads page. Here is an incredibly crude example.
Code:
<?php
$name = $_POST['name'];
$city = $_POST['city'];
//validate var info
//insert into db
?>
<html>
congrads <?=$name?>, we have 100 in <?=$city?>
</html>