Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: PHP help

(99 views • 1 reply)

This topic is 1 page long.

<< < > >>
Sad

TaroNuke

Reply To Post Reply & Quote

Posted at: 10/28/07 07:39 PM

TaroNuke LIGHT LEVEL 15

Sign-Up: 10/05/05

Posts: 118

I'm using MySQL for to organize my MSN icons on my site. But I can't seem to put the icons beside each other like in a row. Instead I have only one row. :sweatdrop2:

MSN Icons Page

You see it's just one row right? But I want them to be beside each other. I tried everything I know and I can't seem to be able to figure it out soo yeah. Here's the code of the icons page:

< ? php

$hostname='MYSQL HOST';
$user='USER';
$pass='PASS';
$dbase='DATABASE';

$connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Can't connect to MySQL");
$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");

$cat = strip_tags(mysql_escape_string($_GET['ca t']));

if($cat != "") {
$q="SELECT * from db_ where series = '$cat' order by id desc ";
} else {
$q="SELECT * from db_ order by id desc ";
}
$result= mysql_query($q, $connection) or die
("Could not execute query : $q." . mysql_error());

$rows_per_page=30;
$total_records=mysql_num_rows($result);
$pages = ceil($total_records / $rows_per_page);
$screen = $_GET["screen"];
if (!isset($screen))
$screen=0;
$start = $screen * $rows_per_page;
$q .= "LIMIT $start, $rows_per_page";
$result= mysql_query($q, $connection) or die
("Could not execute query : $q." . mysql_error());

//Display data from table
while ($row=mysql_fetch_array($result))
{
$id=$row["id"];
$date=$row["date"];
$series=$row["series"];
$artist=$row["artist"];
$avatar_url=$row["avatar_url"];
? >

< div class="left" align="center" >
< img src="< ? php echo "$avatar_url"; ? >" title="ID: [< ? php echo "$id"; ? >] || Series: [< ? php echo "$series"; ? >]" >
< /div >

< ? php
} #end of while
? >


None

TaroNuke

Reply To Post Reply & Quote

Posted at: 10/28/07 07:41 PM

TaroNuke LIGHT LEVEL 15

Sign-Up: 10/05/05

Posts: 118

Whoops, pasted from another forum, forgot to edit link.

MSN icons page


All times are Eastern Daylight Time (GMT -4) | Current Time: 12:58 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!