I am new at PHP and trying to append two variables (which both contain text and then truncate them to 10 characters (from the front)
I have searched the forums/manual and tried with ; without; and various other permutations.
Can any one tell me why I cannot get the variables to take the value on the right side of the equasion? I want the $membershipID to be an amalgamation of $firstName and $lastName and then truncate after the first 10 characters
Here is the bit of the script:
<?PHP
empty($FirstPass) ? # First pass if empty
ShowForm() : # Display the form
$result = $firstName$lastName;
$membershipID = array_slice ($result, 0, 10);
ShowResults ($firstName, $lastName, $username, $password, $handicapStart, $emailAddress, $county, $clubName, $result, $membershipID);
exit;
?>
<?php
function ShowResults ($firstName, $lastName, $username, $password, $handicapStart, $emailAddress, $county, $clubName, $result, $membershipID){echo "These are the details you entered.<br>Please ensure they are correct and click CONFIRMED <br>or user the browsers BACK button to re enter the correct data
<br><FONT COLOR=\"black\" SIZE=\"+1\">Name = $firstName $lastName <br>Username = $username<br>
Password = $password<BR>
Current Handicap = $handicapStart<BR>
Your Email Address = $emailAddress <BR>
County of Home Club = $county<br>
Club Name = $clubName<br>
$result<br>
$membershipID<br>
</FONT>
<UL>\n";
#foreach ($GLOBALS as $Key=>$Value){
#echo "<LI>\$GLOBALS[\"$Key\"]=$Value\n";
} # End of foreach ($GLOBALS as $Key=>$Value)
echo "</UL>\n";
} # End of function ShowResults