Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Sledmore ASE News Post Error?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Derpec" data-source="post: 220501" data-attributes="member: 13266"><p>This is my News_Submit.php</p><p>[CODE]</p><p><?php $pagerank = 6; include "templates/header.php"; ?></p><p></p><p> <div id="site_content"></p><p> <?php include "templates/sidebar.php"; ?></p><p> <div id="content_container"></p><p></p><p> <div id="content"></p><p> <h1>Obbo Hotel News Step2</h1><hr/></p><p> <?php</p><p></p><p> if(!isset($_SESSION["longstory"]))</p><p> {</p><p> header("Location: ".$_CONFIG['hotel']['url']."/ase/index.php?url=news");</p><p> exit;</p><p> }</p><p></p><p> if(isset($_POST["proceed"]))</p><p> {</p><p> $author = mysql_result(mysql_query("SELECT username FROM users WHERE id = '".$_SESSION['user']['id']."' LIMIT 1"), 0);</p><p> mysql_query("INSERT INTO cms_news (title,shortstory,longstory,published,image,author, campaign, campaignimg) VALUES ('" . filter($_SESSION["title"]) . "', '" . filter($_SESSION["shortstory"]) . "', '".($_SESSION["longstory"])."', '" . time() . "', '" . filter($_POST["topstory"]) . "', '" . filter($author) . "', 0, 'default')") or die(mysql_error());</p><p> unset($_SESSION["title"], $_SESSION["shortstory"], $_SESSION["longstory"]);</p><p> header("Location: ".$_CONFIG['hotel']['url']."/ase/index.php?url=dash");</p><p> exit;</p><p> }</p><p> </p><p> echo '<center><b>It\'s time to choose the image for your story. Choose one from the drop down list and click "Check Image"';</p><p> echo '<form method="post">';</p><p> echo '<br />';</p><p> echo '<select name="topstory" id="topstory" style="font-size: 14px;"';</p><p> </p><p> if ($handle = opendir('/swfs/c_images/Top_Story_Images/'))</p><p> { </p><p> while (false !== ($file = readdir($handle)))</p><p> {</p><p> if ($file == '.' || $file == '..')</p><p> {</p><p> continue;</p><p> } </p><p> </p><p> echo '<option value="' . $file . '"';</p><p> </p><p> if (isset($_POST['topstory']) && $_POST['topstory'] == $file)</p><p> {</p><p> echo ' selected';</p><p> }</p><p> </p><p> echo '>' . $file . '</option>';</p><p> }</p><p> }</p><p></p><p> echo '</select>';</p><p> </p><p> if(isset($_POST["check"]))</p><p> {</p><p> echo '<br /> <br /> <input type="submit" value=" Check image " name="check" /> <br /><br />';</p><p> echo '<font size="3">Topstory image<br /></font><img src="/swfs/c_images/Top_Story_Images/' . $_POST["topstory"] . '" align="right />';</p><p> echo '</center> <align="right"> <br /> <br /> <input type="submit" value=" Proceed (use image) " name="proceed" /> <br />';</p><p> echo '</form>';</p><p> }</p><p> else</p><p> {</p><p> echo '<br /> <br /> <input type="submit" value=" Check image " name="check" /> <br />';</p><p> echo "</form>";</p><p> }</p><p> ?></p><p> </div></p><p> </div></p><p> </div></p><p></p><p><?php include "templates/footer.php"; ?></p><p>[/CODE]</p><p> </p><p>I think i got it right?</p><p> </p><p>swfs is my folder name so</p></blockquote><p></p>
[QUOTE="Derpec, post: 220501, member: 13266"] This is my News_Submit.php [CODE] <?php $pagerank = 6; include "templates/header.php"; ?> <div id="site_content"> <?php include "templates/sidebar.php"; ?> <div id="content_container"> <div id="content"> <h1>Obbo Hotel News Step2</h1><hr/> <?php if(!isset($_SESSION["longstory"])) { header("Location: ".$_CONFIG['hotel']['url']."/ase/index.php?url=news"); exit; } if(isset($_POST["proceed"])) { $author = mysql_result(mysql_query("SELECT username FROM users WHERE id = '".$_SESSION['user']['id']."' LIMIT 1"), 0); mysql_query("INSERT INTO cms_news (title,shortstory,longstory,published,image,author, campaign, campaignimg) VALUES ('" . filter($_SESSION["title"]) . "', '" . filter($_SESSION["shortstory"]) . "', '".($_SESSION["longstory"])."', '" . time() . "', '" . filter($_POST["topstory"]) . "', '" . filter($author) . "', 0, 'default')") or die(mysql_error()); unset($_SESSION["title"], $_SESSION["shortstory"], $_SESSION["longstory"]); header("Location: ".$_CONFIG['hotel']['url']."/ase/index.php?url=dash"); exit; } echo '<center><b>It\'s time to choose the image for your story. Choose one from the drop down list and click "Check Image"'; echo '<form method="post">'; echo '<br />'; echo '<select name="topstory" id="topstory" style="font-size: 14px;"'; if ($handle = opendir('/swfs/c_images/Top_Story_Images/')) { while (false !== ($file = readdir($handle))) { if ($file == '.' || $file == '..') { continue; } echo '<option value="' . $file . '"'; if (isset($_POST['topstory']) && $_POST['topstory'] == $file) { echo ' selected'; } echo '>' . $file . '</option>'; } } echo '</select>'; if(isset($_POST["check"])) { echo '<br /> <br /> <input type="submit" value=" Check image " name="check" /> <br /><br />'; echo '<font size="3">Topstory image<br /></font><img src="/swfs/c_images/Top_Story_Images/' . $_POST["topstory"] . '" align="right />'; echo '</center> <align="right"> <br /> <br /> <input type="submit" value=" Proceed (use image) " name="proceed" /> <br />'; echo '</form>'; } else { echo '<br /> <br /> <input type="submit" value=" Check image " name="check" /> <br />'; echo "</form>"; } ?> </div> </div> </div> <?php include "templates/footer.php"; ?> [/CODE] I think i got it right? swfs is my folder name so [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Sledmore ASE News Post Error?
Top