[ create a new paste ] login | about

Link: http://codepad.org/dXKlrLtv    [ raw code | fork ]

Plain Text, pasted on Dec 18:
$id2 = $_SESSION['id'];
$naturesql = mysql_query("SELECT * FROM backgrounds WHERE type=2");
while($row = mysql_fetch_array($naturesql)) {
    $id = $row['id'];
    $name = $row['name'];
    $background = $row['background'];
    $pic = $row['image'];

    $check = mysql_query("SELECT * FROM store_items WHERE userid='$id2'");
    while($checkrow = mysql_fetch_array($check)) {
        $types = $checkrow['type2'];
    }

    if($id == $types) {
        $bought = 'This item has already been bought';
    } else {
        $bought = '<form>
                   </form>';
    // this form works fine
    }

	$display .= '<table width="100%"><tr><td><center><font size="+1">' . $name . '</font></center></td></tr><tr><td><center><img src="' . $pic . '" width="80px"></img></center></td></tr><tr><td>' . $bought . ' </td></tr></table>';
}

...

<?php echo $display ?>


Create a new paste based on this one


Comments: