Mika Jaaksi wrote:
Thanks for the aswers, but there is still some problems.

I tested this code(below) and it works but when I add it to the rest of my
code it stops working.

Here's the working code:


$bandname = "Someband";
<form name="goto_info" action="band_info.php" method="post">
<input type="hidden" name="bandname" value="<?php echo $bandname; ?>">
<a href="band_info.php?bandname=$bandname" onclick="goto_info.submit();
return false;"><?php echo $bandname; ?></a>

and page2:

Bandname is <?php echo $_POST["bandname"]; ?>!

Where are you inserting this data to the bands table? Did it work? Did you get an error back from mysql?

If you check the db manually, is the data there?

That will at least tell you if the insert is the problem or if it's the retrieval.

Now, here's the one I've been fighting with:

@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM band";


If you're going to show all results, you could probably do this:

while ($row = mysql_fetch_assoc($result)) {

Saves keeping a counter, doing a mysql_num_rows etc.

Postgresql & php tutorials

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to