I'm coding up a blogging system using ssi and I'm trying to get the users to enter the "board id" in the form then $post it into the next page
on the first page I've got a form with
<form action="blogid.php" method="post">
<b>Enter Custom Blog ID</b> <input type="text" id="id" />
<input type="submit" />
on the second "blogid.php" page I've got
<?php ssi_boardNews(''<?php echo $_POST["id"]; ?>'); ?>
^for some reason the first ' dosen't show up so I put 2^
Without the $Post and just replacing with a boardid it works perfectly. (like this) <?php ssi_boardNews(2); ?>
Otherwise it gives me this:
You cannot specify a board that doesn't allow guests. Please check the board ID before trying again.
All help will be greatly appreciated :) I can't seem to work this out.
Try this code in your second page:
<?php
$_POST['id'] = (int) $_POST['id'];
ssi_boardNews($_POST['id']);
?>
<input type="text" id="id" />
has no name tag so it wont work.
should be:
<input type="text" id="id" name="id" />
That worked great thanks ;)
Opps, I've missed that. Thanks Niko. Marked the topic as solved.