Could you please post your MySQL table structure that you’re using in this case?Or the field id in your table is AUTO_INCREMENT?And for the second problem,are you see this warning here?
Array ( [0] => 00000 [1] => [2] => )
You are now registered with the following details:
array(1) { [0]=> array(9) { ["firstname"]=> string(4) "Fred" ["lastname"]=> string(6) "Bloggs" ["jobtitle"]=> string(6) "Editor" ["organisation"]=> string(12) "Daily Gossip" ["country"]=> string(2) "UK" ["landline"]=> string(13) "0111 222 3333" ["cellphone"]=> string(13) "07777 888 999" ["email"]=> string(18) "fred@blahblah.blah" ["password"]=> string(8) "********" } }
[COLOR="#FF0000"]Warning: htmlspecialchars() expects parameter 1 to be string, array given in //the pathway to that line[/COLOR]
Why did you prefer to believe Yank’s code is right and don’t do it like below for a test?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Registration Details</title>
</head>
<body>
<p>You are now registered with the following details:</p>
<?foreach ($regdetails as $item): ?>
<blockquote>
<p>
<?php foreach($item as $field) echo htmlspecialchars($field, ENT_QUOTES, 'UTF-8');?>
</p>
</blockquote>
<?php endforeach; ?>
</body>
</html>