using $post for SSI from form.. not working (simple?)

Started by A2xA, August 15, 2008, 12:20:54 PM

Previous topic - Next topic

A2xA

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.


Online Video Game Battles Community that Supports Xbox 360, Wii, And PS3

[SiNaN]

Try this code in your second page:

<?php

$_POST
['id'] = (int) $_POST['id'];

ssi_boardNews($_POST['id']);

?>
Former SMF Core Developer | My Mods | SimplePortal

niko

<input type="text" id="id" />

has no name tag so it wont work.
should be:

<input type="text" id="id" name="id" />
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

A2xA



Online Video Game Battles Community that Supports Xbox 360, Wii, And PS3

[SiNaN]

Opps, I've missed that. Thanks Niko. Marked the topic as solved.
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: