Originally Posted by aussie1855
I have 2 coding questions:
Q1: i have two input variables that are a form that holds 'First Name' and 'Surname' i need some code to then output the variables to a third called 'Full Name'
You can use the concatenate character (.) to join strings together like:
$firstname = "john";
$fullname = $firstname."".$lastname
echo "First Name:".$firstname."<br />";
echo "Last Name:".$firstname."<br />";
echo "Full Name:".$fullname."<br />";
echo "Full Name Method 2:".$firstname." ".$lastname."<br />";
Then we just use the echo statement to output them to the screen.
Q2: my submit_email.php has an entry for a user to input their email address which is then used within the form as a variable called 'email'. However my domain host only allow email from within the domain so i need to hard code the address. How can I do this.
What do you mean, you need to check if the submitted e-mail address has the same domain as yours?
If so you'd need to do a pregmatch of some sort and check that after the @ sign it matches your domain, but i dont know how to do this