this my script.When i do this,it works fine


$query = "select * FROM aboutusx order by title desc";


but when i do this

$query = "select * FROM aboutusx WHERE myaccountid='$myid' order by title desc";

then i get this

Notice: Undefined variable: start in D:\xampp\htdocs\kwa\admin\userindex\inc\ps_pagination.php on line 176

i need this piece of code myaccountid='$myid' in order to select data input by user with that id .Am building a cms that require user specific data shown to specific users with specific user id

full code below

$query = "select * FROM aboutusx WHERE myaccountid='$myid' order by title desc";
$pager = new ps_pagination($conn,$query,50,50);
$rs = $pager->paginate();
while($row = mysql_fetch_assoc($rs))

    $id = $row['id'];
    $page = $row['title'];
    $category =  substr($row['pagecontent'],0, $count_num_str);
    $isshow = $row['isshow'];

    <table width='100%' border='0' cellspacing='1' cellpadding='1'>
    <tr bgcolor='#FFECD9'>
    <td width='7%' align=center class=fonts><a href=aboutusx.php?nav=edit&id=$id&page=$page&category=$category><img src='img/icon/edit.gif' width='18' height='18' border='0' /></a></td>
    <td width='25%' align='left' class='bodyTxt'>&nbsp;$page</td>
    <td width='25%' align='justify' class='bodyTxt'>&nbsp;$category ...</td>
    <td width='25%' align='center' class='bodyTxt'>&nbsp;$isshow</td>
    <td width='7%' align='center'><a href=delete.php?nav=del&id=$id>
<img src='img/icon/delete.gif' width='18' height='18' border='0' /></a></td>                            
                    <tr bgcolor=#FF9933 align=center>
                      <td colspan=14><div align=center><img src=/img/spacer.gif width=1 height=1></div></td>
            //Display the full navigation in one go
            echo"<tr><td class='bodyTxt' colspan='14' align='center'><br>".$pager->renderFullNav(). "</td></tr></table>";

Recommended Answers

All 3 Replies

Your variable $myid has no value. Somewhere in your code there must be a line:

$myid = 1; // or whatever it is you need

there is a value, its in a $myid =$_SESSION['myid']; at the up.

Misread. The notice is "Notice: Undefined variable: start", so look for the line where start is used.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.