Member Avatar for tie372
<title>plastic sarcastic</title>
<?php include "header.html"; ?>
hey whats up?<br><br>

<?php
$sql=mysql_query("SELECT * FROM bands);

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

<form action="band.php?band=<?php echo $rows[name]; ?>">
<input type="submit" value="<?php echo $rows[name]; ?>" style="background: black; color: 660099; font-size: 1.2em; border: 0px"></form>

<?php
}
?>

^^^That's my code. I was wondering why I get errors. It has nothing to do with me ending the php tag and then restarting it, im sure. The error seems to be on
<form action="band.php?band=<?php echo $rows[name]; ?>">

In the blind :
<?php echo"$rows[name]"; ?>

Member Avatar for tie372

Sorry, didn't work.

EDIT- Fixed itself, i forgot the end " at the end of $sql.

Thanks anyways.

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.