I thought I'd try my hand at some PHP. Am creating a simple-ish web-form, that could be used to place an order. It then sends out confirmation/order emails to the correct places.
It all seems to be working fine, apart from one thing. Whenever I'm trying to print text, rather than an int from a variable, it gives me a strange int... I can't even really work out where is is coming from.
I'm using the POST method from my html form, grabbing the data as below:
$firstName = $_POST['firstName']; $lastName = $_POST['lastName']; $email = $_POST['email']; $telno = $_POST['telno']; $add1 = $_POST['addressL1']; $add2 = $_POST['addressL2']; $town = $_POST['town']; $county = $_POST['county']; $postCode = $_POST['postCode']; $selUnit = $_POST['unitMaterial']; $quantity = $_POST['quantity'];
However, when I try and print those variables, the ones that are ints ("quantity") appear ok, but the others seem to give int values too. Here is an instance (trying to print address):
<?php echo $add1 . "<br />"; echo $add2 . "<br />"; echo $town . "<br />"; echo $county . "<br />"; echo $postCode . "<br />"; ?>
Now to me that's just standard, really simple sort of stuff (I think I'm doing the adding of the two strings ok for PHP).
But all that gives an output in my email of "40000". I'm just not quite sure, as I'm not comfortable in debugging in PHP yet, why it would be giving the int value.
Any suggestions would be awesome, thanks. :)


Sign In
Create Account


Back to top










