Jump to content

[SOLVED] Question


Zepo.

Recommended Posts

I have a list of news with an edit icon next to them. I made the url of each one /news.php?act=edit&id=5 where the id changes, so when in act=edit, it knows which one to edit. But when i use this link, it comes up with a blnk page. I'm lost.

Link to comment
Share on other sites

Still says page cannot be found. Heres the code

<?php
/*Start the sesion*/
session_start(); 

/*Lets pull the data from the database*/
$result = mysql_query("SELECT * FROM news");
$news = mysql_fetch_array($result);

/*Check the sessions permissions*/
if (isset($_SESSION['name'])) {
if ($_SESSION['rights'] == 100){

if ($act == "editnews") {

echo "<div class='pagetitle'>News Manager</div>
<div style='margin:10px'>
<br />
<table cellpadding='4' cellspacing='0' border='0' align='center' width='95%' class='tborder' id='optionsform' >
<colgroup span='2'>
<col style='width:45%'></col>
<col style='width:55%'></col>
</colgroup>
<tr>
<td class='tcat' align='center' colspan='2'>
<b>Edit News</b>
</td>
</tr>";

while($news = mysql_fetch_array($result))
{
echo "
<tr valign='top'>
<td class='optiontitle'  colspan='2'><div>$news[title]</div></td>
</tr>
<tbody id='tbody_keywords'>
<tr valign='top'>
<td class='alt1'><div class='smallfont' >$news[news]</div><div align='right' style='float:right'>
<a href='./news.php?act=edit&id=$news[id]'><img src='./images/edit.gif' alt='Edit' border='0'></a> | 	<a href='./news.php?act=delete&id=$news[id]'><img src='./images/delete.gif' alt='Delete' border='0'></a></div></td>
</tr>";
}

echo "
</tbody>
</table>";
}
if ($_GET['act'] == 'edit' && !empty($_GET['id'])){
echo "TEST";
}

if ($_GET['act'] == 'delete' && !empty($_GET['id'])){
echo "DELETE";
}
}
}



?>

 

Webpage cannot be found.....

 

 

 

I think i solved it , sorry guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.