printcat.php function not posting the data to my webpages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

printcat.php function not posting the data to my webpages

Post by vonoventwin »

I have a website http://www.alamotrades.com that I want to use as a classified ad website. I have users post an ad by using this form http://www.alamotrades.com/post.html and then it post to a MySQL database (MySQL Farm 2 environment). The information submits fine to the MySQL database. And I even get an email to Approve the post.

Here is the is the printcat.php (http://www.alamotrades.com/printcat.rar)

The only problem I have is the printcat.php calling the information out of the database back to the pages. This same php code below is in all of the pages with the $cat Real Estate>For Rent and the $page "realestate_for_rent.html" different for each?? This is what I put in one of the pages to call upon the function:

Code: Select all

PHP Code:
<?php 
include("php-lib/printcat.php"); 
printcat("Real Estate>For Rent", $thelimit, "realestate_for_rent.html"); 
?>

This is the problem... I have stuff in the MySQL database but my PHP script (printcat.php) isn't calling it to the page http://alamotrades.com/realestate_for_sale.html

My friend wrote this code about 2 years ago and now I'm trying to get it working. I know very little about PHP and MySQL so I'm not sure what is wrong. But this exact code was working for his website before, I just tried to modify it for mine. I don't see what's wrong and was wondering if someone could help me with the problem. I will even give you access if you are willing to go in and make it work. Thanks!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

and what is printcat() looking like?
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

Jcart wrote:and what is printcat() looking like?
Here is the is the printcat.php (http://www.alamotrades.com/printcat.rar)
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

$20 PAYPAL to fix it and get it working...
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.

Weirdan|
Job offerings should be posted in Job Hunt forum.

If I were you, I would do as Jcart suggested, though.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Please post the code on the forums and don't make us work extra to help you out. Many people are willing to help you for free if you make a little bit of effort ;)
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

Oh ok here it is then:

Code: Select all

<?php

function printcat ($thecat, $thelimit, $thepage, $search="") {
    // establish db connection
    $sql_link = mysql_connect("mysqlhost", "u70262984", "xxxxxx");
    mysql_select_db("d60244618");
?>



<?php



$numperpage = 5;

if ($thelimit == "") {
    $thelimit = "0," . $numperpage;
}


if ($thepage != "search.html") {
    $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where typeofitem='" . $thecat . "' and active='1' order by id asc limit " . $thelimit);
    $sql_nummessages = mysql_query("select count(*) from content where typeofitem='" . $thecat . "' and active='1'");
    echo "1";
} else {
    if ($thecat == "" || $thecat=="ALL") {
        $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where match(description) against('" . addslashes($search) . "') and active='1' order by id asc limit " . $thelimit);
        $sql_nummessages = mysql_query("select count(*) from content where match(description) against('" . addslashes($search) . "') and active='1'");
        echo "2";
    } else {
        if ($search == "") {
            $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where typeofitem='" . $thecat . "' and active='1' order by id asc limit " . $thelimit);
            $sql_nummessages = mysql_query("select count(*) from content where typeofitem='" . $thecat . "' and active='1'");
            echo "3";
        } else {
            $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where typeofitem='" . $thecat . "' and match(description) against('" . addslashes($search) . "') and active='1' order by id asc limit " . $thelimit);
            $sql_nummessages = mysql_query("select count(*) from content where typeofitem='" . $thecat . "' and match(description) against('" . addslashes($search) . "') and active='1'");
            echo "4";
        }
    }
}






$nummes = mysql_fetch_row($sql_nummessages);
$numresults = $nummes[0];
$thelimitarr = explode(",", $thelimit);
$curpage = ceil(($thelimitarr[0] + $numperpage) / $numperpage);
$numpages = ceil($numresults / $numperpage);

if ($thecat == "") { $thecat="ALL";}
?>


<?php if ($search=="") {echo $getcat_keys[2];} else {echo "Search Terms: (" . $thecat . ") ''" . stripslashes($search) . "''<br><br>";}?>


<table border=0 width=100%>
<?php if ($numpages > 1) { ?>
<tr>
    <Td width=50><?php if ($curpage != "1") { ?>
                    <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] - $numperpage;?>,<?php echo $numperpage;?>'"><<Previous</a>
                    <?php } ?>&nbsp;</td>
    <td align=center><?php echo "<br><b>Viewing page " . $curpage . " of " . $numpages . "</b>";?></td>
    <td width=50><?php if ($curpage != $numpages) { ?>
                    <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] + $numperpage;?>,<?php echo $numperpage;?>'">Next>></a>
                    <?php } ?>&nbsp;</td>
</tr>
<tr>
<td colspan=3 align=center>

<?php
if ($numresults > $numperpage) {

    if ($curpage < 5) {

        for ($xxx = 0; $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = 9;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}

    } else {
        if ($curpage != "5") {
            echo "... | ";
        }
        for ($xxx = ($curpage - 5); $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = $curpage + 3;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}
    }



}
?>

</td>
</tr>
<?php } ?>

<tr>
<td colspan=3>

<table border=0 width=100%>
<?php







if ($numresults == "0") {
    echo "<br><br><font size=3><b>Sorry, your search returned no results.</b></font><Br><br>";
}

    while($cat_keys = mysql_fetch_row($sql_cat)) {
?>
<tr>
    <td width=100><?php if ($cat_keys[6] != "" && file_exists("/export/home/d60244618/public_html/images/content/" . $cat_keys[6])) { ?><a href="http://www.alamotrades.com/php-lib/img.php?filename=images/content/<?php echo $cat_keys[6];?>&width=900&height=900" target="_blank"><img src="http://www.alamotrades.com/php-lib/img.php?filename=images/content/<?php echo $cat_keys[6];?>&width=100&height=100" border=0><br><font size="1">Click to enlarge</font></a><?php } else { ?><img src="http://www.alamotrades.com/images/notavail.gif"><?php } ?></td>
    <td>
    <?php if ($search != "") { ?>
    <font size="3"><b><?php echo $cat_keys[1];?></b></font><br>
    <?php } ?>

    <?php echo $cat_keys[2];?>
        <br><br>
        <b>Name:</b> <?php echo $cat_keys[3];?><br>
        <b>Phone:</b> <?php echo $cat_keys[5];?><br>
        <b>Email:</b> <a href="mailto:<?php echo $cat_keys[4];?>"><?php echo $cat_keys[4];?></a><br>

    </td>
</tr>
<tr>
    <td colspan=2><hr></td>
</tr>
    <?php
    }
?>

</table>

</td>
</tr>


<?php if ($numpages > 1) { ?>
<tr>
    <Td width=50><?php if ($curpage != "1") { ?>
                    <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] - $numperpage;?>,<?php echo $numperpage;?>'"><<Previous</a>
                    <?php } ?>&nbsp;</td>
    <td align=center><?php if ($numpages > 1) {echo "<br><b>Viewing page " . $curpage . " of " . $numpages . "</b>";}?></td>
    <td width=50><?php if ($curpage != $numpages) { ?>
                   <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] + $numperpage;?>,<?php echo $numperpage;?>'">Next>></a>
                    <?php } ?>&nbsp;</td>
</tr>
<tr>
<td colspan=3 align=center>

<?php
if ($numresults > $numperpage) {

    if ($curpage < 5) {

        for ($xxx = 0; $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = 9;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}

    } else {
        if ($curpage != "5") {
            echo "... | ";
        }
        for ($xxx = ($curpage - 5); $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = $curpage + 3;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}
    }



}
?>

</td>
</tr>
<?php } ?>
</table>

<?php
}

?>
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

lets start simple:

Code: Select all

$sql_link = mysql_connect("mysqlhost", "u70262984", "xxxxxx") or die(mysql_error()); 
    mysql_select_db("d60244618") or die(mysql_error());
Every time you see a mysql_query(..); add the error reporting "or die(mysql_error()); like I have done above.
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

Ok I think I have done that:

Code: Select all

<?php

function printcat ($thecat, $thelimit, $thepage, $search="") {
    // establish db connection
    $sql_link = mysql_connect("mysqlhost", "u70262984", "xxxxxx") or die(mysql_error());
    mysql_select_db("d60244618") or die(mysql_error());
?>



<?php



$numperpage = 5;

if ($thelimit == "") {
    $thelimit = "0," . $numperpage;
}


if ($thepage != "search.html") {
    $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where typeofitem='" . $thecat . "' and active='1' order by id asc limit " . $thelimit) or die(mysql_error());
    $sql_nummessages = mysql_query("select count(*) from content where typeofitem='" . $thecat . "' and active='1'") or die(mysql_error());
    echo "1";
} else {
    if ($thecat == "" || $thecat=="ALL") {
        $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where match(description) against('" . addslashes($search) . "') and active='1' order by id asc limit " . $thelimit) or die(mysql_error());
        $sql_nummessages = mysql_query("select count(*) from content where match(description) against('" . addslashes($search) . "') and active='1'") or die(mysql_error());
        echo "2";
    } else {
        if ($search == "") {
            $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where typeofitem='" . $thecat . "' and active='1' order by id asc limit " . $thelimit) or die(mysql_error());
            $sql_nummessages = mysql_query("select count(*) from content where typeofitem='" . $thecat . "' and active='1'") or die(mysql_error());
            echo "3";
        } else {
            $sql_cat = mysql_query("select id, typeofitem, description, yourname, email, phone, photo, active from content where typeofitem='" . $thecat . "' and match(description) against('" . addslashes($search) . "') and active='1' order by id asc limit " . $thelimit) or die(mysql_error());
            $sql_nummessages = mysql_query("select count(*) from content where typeofitem='" . $thecat . "' and match(description) against('" . addslashes($search) . "') and active='1'") or die(mysql_error());
            echo "4";
        }
    }
}






$nummes = mysql_fetch_row($sql_nummessages) or die(mysql_error());
$numresults = $nummes[0];
$thelimitarr = explode(",", $thelimit);
$curpage = ceil(($thelimitarr[0] + $numperpage) / $numperpage);
$numpages = ceil($numresults / $numperpage);

if ($thecat == "") { $thecat="ALL";}
?>


<?php if ($search=="") {echo $getcat_keys[2];} else {echo "Search Terms: (" . $thecat . ") ''" . stripslashes($search) . "''<br><br>";}?>


<table border=0 width=100%>
<?php if ($numpages > 1) { ?>
<tr>
    <Td width=50><?php if ($curpage != "1") { ?>
                    <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] - $numperpage;?>,<?php echo $numperpage;?>'"><<Previous</a>
                    <?php } ?>&nbsp;</td>
    <td align=center><?php echo "<br><b>Viewing page " . $curpage . " of " . $numpages . "</b>";?></td>
    <td width=50><?php if ($curpage != $numpages) { ?>
                    <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] + $numperpage;?>,<?php echo $numperpage;?>'">Next>></a>
                    <?php } ?>&nbsp;</td>
</tr>
<tr>
<td colspan=3 align=center>

<?php
if ($numresults > $numperpage) {

    if ($curpage < 5) {

        for ($xxx = 0; $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = 9;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}

    } else {
        if ($curpage != "5") {
            echo "... | ";
        }
        for ($xxx = ($curpage - 5); $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = $curpage + 3;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}
    }



}
?>

</td>
</tr>
<?php } ?>

<tr>
<td colspan=3>

<table border=0 width=100%>
<?php







if ($numresults == "0") {
    echo "<br><br><font size=3><b>Sorry, your search returned no results.</b></font><Br><br>";
}

    while($cat_keys = mysql_fetch_row($sql_cat)) {
?>
<tr>
    <td width=100><?php if ($cat_keys[6] != "" && file_exists("/images/content/" . $cat_keys[6])) { ?><a href="http://www.alamotrades.com/php-lib/img.php?filename=images/content/<?php echo $cat_keys[6];?>&width=900&height=900" target="_blank"><img src="http://www.alamotrades.com/php-lib/img.php?filename=images/content/<?php echo $cat_keys[6];?>&width=100&height=100" border=0><br><font size="1">Click to enlarge</font></a><?php } else { ?><img src="http://www.alamotrades.com/images/notavail.gif"><?php } ?></td>
    <td>
    <?php if ($search != "") { ?>
    <font size="3"><b><?php echo $cat_keys[1];?></b></font><br>
    <?php } ?>

    <?php echo $cat_keys[2];?>
        <br><br>
        <b>Name:</b> <?php echo $cat_keys[3];?><br>
        <b>Phone:</b> <?php echo $cat_keys[5];?><br>
        <b>Email:</b> <a href="mailto:<?php echo $cat_keys[4];?>"><?php echo $cat_keys[4];?></a><br>

    </td>
</tr>
<tr>
    <td colspan=2><hr></td>
</tr>
    <?php
    }
?>

</table>

</td>
</tr>


<?php if ($numpages > 1) { ?>
<tr>
    <Td width=50><?php if ($curpage != "1") { ?>
                    <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] - $numperpage;?>,<?php echo $numperpage;?>'"><<Previous</a>
                    <?php } ?>&nbsp;</td>
    <td align=center><?php if ($numpages > 1) {echo "<br><b>Viewing page " . $curpage . " of " . $numpages . "</b>";}?></td>
    <td width=50><?php if ($curpage != $numpages) { ?>
                   <a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] + $numperpage;?>,<?php echo $numperpage;?>'">Next>></a>
                    <?php } ?>&nbsp;</td>
</tr>
<tr>
<td colspan=3 align=center>

<?php
if ($numresults > $numperpage) {

    if ($curpage < 5) {

        for ($xxx = 0; $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = 9;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}

    } else {
        if ($curpage != "5") {
            echo "... | ";
        }
        for ($xxx = ($curpage - 5); $xxx < $numpages; $xxx++) {
            if ($xxx == 1) {
                $xxxnum = $numperpage;
            } else {
                $xxxnum = ($xxx * $numperpage);
            }

            if ($curpage - 1 != $xxx) {
                echo '<a href="' . $thepage . '?typeofitem=' . $thecat . '&search=' . $search . '&thelimit=' . $xxxnum . ',' . $numperpage . '">';
            }
                echo $xxx + 1;
            if ($curpage - 1 != $xxx) {
                echo '</a>';
            }

            if (($xxx + 1) != $numpages) {
                echo " | ";
            }
            if ($curpage + 3 > $numpages) {
                $whentostop = $numpages;
                $aretheremore = "no";
            } else {
                $whentostop = $curpage + 3;
                $aretheremore = "yes";
            }
            if ($xxx == $whentostop) {
                $xxx = $numpages;
            }
        }
        if ($aretheremore == "yes") {echo " ...";}
    }



}
?>

</td>
</tr>
<?php } ?>
</table>

<?php
}

?>
Last edited by vonoventwin on Wed Jun 21, 2006 9:09 pm, edited 1 time in total.
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

what about this? is it added anywhere on this row? somthing doesn't look right b/c there is no ";" at the end...

Code: Select all

while($cat_keys = mysql_fetch_row($sql_cat)) {
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

Also this seems to keep replacing my ":" with this & # 0 5 8 ;

Code: Select all

<a href="javascript: location.href='<?php echo $thepage;?>?typeofitem=<?php echo $thecat;?>&search=<?php echo $search;?>&thelimit=<?php echo $thelimitarr[0] - $numperpage;?>,<?php echo $numperpage;?>'"><<Previous</a>

Is that OK?
Last edited by vonoventwin on Wed Jun 21, 2006 9:29 pm, edited 1 time in total.
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

By the way, thank you so much for taking the time to help. I know I'm just a little peon when it comes to php, but man I would really like to learn it.. Thanks again!
vonoventwin
Forum Newbie
Posts: 9
Joined: Tue Jun 20, 2006 11:13 pm

Post by vonoventwin »

Also this might help... It's the MySQL setup:

id typeofitem description yourname email phone photo active exp_date
1 Rec Vehicles ASa sasdA DSGS@oopd.com 2342234522 7192006 1 2006-07-19
2 Rec Vehicles dfa sdfasd xvsa@msn.com 563-343-2323 7192006ups.jpg 1 2006-07-19
3 Miscellaneous Book Brad brad@brad.com 555-555-5555 7192006teq.jpg 1 2006-07-19
4 Sporting Goods dfhsdfsdf sadfhsdf sdfgsdf@aol.com 343-343-3434 7192006car.jpg 1 2006-07-19
5 Real Estate>For Sale sdasd asdfasd asdfas@sdsd.com 444-444-4444 7202006ups.jpg 1 2006-07-20
6 Miscellaneous Bottle Brad sdgsad@sd.com 444-444-4444 7212006Sample.jpg 0 2006-07-21
Post Reply