Old 04-12-2005   #16 (permalink)
Registered User
 
ViciOuS's Avatar
 
Join Date: Apr 2005
Posts: 82

Hmm, here is what i did to EditNews_interface.php

Code:
<?php 
include('session_vars.php');
// Check to see if they are logged in..
if ($enpw != $pw){
header("Location: ../ad_login.php");}


include('mysql_connect.php');

$id = $_GET['id'] + 0;
if(!is_numeric($id)) die("id is not a number");

$sql = mysql_query("SELECT * FROM news ORDER BY id DESC");

while($row = mysql_fetch_array($sql))
{
?> 


<html><head><title></title>
<style>
<!--
a{text-decoration:none}
//-->
</style>
<style>
a:visited{color:blue; text-decoration:none; }
a:active{color:red; text-decoration:none; }
a:link{color:red; text-decoration:none; }
a:hover{color:orange; text-decoration:underline; }
</style>
</head>
<BODY background="../images/image_22.gif">
<div align="left">
 <TABLE width="100%" border="0" cellspacing="0" cellpadding="3">
   <tr> 
     <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<?php echo $row['title'] . ' | Posted by: ' . $row['name'] . ' on ' . $row['date'] . ' ID# ' . $row['id']; ?></font></b>
     </td>
   </tr>
   <tr>
     <td>
      [ <a href="EditNews.php?id=<?php echo $id; ?>">Edit Post</a> ] [ 
      <a href="DelNews.php?id=<?php echo $id; ?>">Delete Post</a> ]
     </td>
     <br>
   </tr>
 </TABLE>
</div>
</body>
</html>

<?php
}
?>
I changed the links so that the php tags were only around the variable instead of the whole a href tag and now all my link locations say ?id=0 instead of ?id=$id.

I can't seem figure out why it's displaying it as nothing.

{ EDIT | 5 minutes later }

Wooooooooooo !!!!!

I figured $_GET['id'] isnt working properly and I already know that the value of $row['id'] returns the same thing so i switched $id with $row['id'] in my links and now both edit and delete work like a charm

I want to thank all of you who helped me get through this, you have all been very patient and understanding to my skill level. You can bet that I will be chatting on these forums from here on out.

- ViciOuS
aka Ryan

Last edited by ViciOuS; 04-12-2005 at 02:50 AM..
ViciOuS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-12-2005   #17 (permalink)
Registered User
 
ViciOuS's Avatar
 
Join Date: Apr 2005
Posts: 82

Aww crap.. when I try to edit a news post, it says it uploaded successfully but it doesnt do anything at all.
ViciOuS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-13-2005   #18 (permalink)
Local Biorust Beast
 
Order's Avatar
 
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253

Send a message via AIM to Order Send a message via MSN to Order Send a message via Yahoo to Order
Seen your mistake and that was what I was mentioning earlier.. lol
__________________
Order is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-13-2005   #19 (permalink)
Registered User
 
ViciOuS's Avatar
 
Join Date: Apr 2005
Posts: 82

Woooo!!!

My Handle_EditNews.php had "UPDATE news SET news='$news' WHERE id='$ID'"

When I declared it as $id and not $ID above. This fixes my edit news script and thank you all for helping me!!
ViciOuS is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-14-2005   #20 (permalink)
Local Biorust Beast
 
Order's Avatar
 
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253

Send a message via AIM to Order Send a message via MSN to Order Send a message via Yahoo to Order
Your welcome, we are here to help where we can.
__________________
Order is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 03:01 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT