0

could the problem be on the first form, at the:

echo '<td><a href="phoneupdate1.php?id='.$row[0].'">Update</a></td><br/><hr>';

area? Maybe its not passing the id to the next form. Is there a way to test this?

0

could the problem be on the first form, at the:

echo '<td><a href="phoneupdate1.php?id='.$row[0].'">Update</a></td><br/><hr>';

area? Maybe its not passing the id to the next form. Is there a way to test this?

No, that is right, $row[0] refers to the column id in the database, the easy way to check, click it and see if the correct number shows up in the URL on the next page :)

http://www.elvenblade.com/test/ - that is the script I posted in my previous message, it all seems to be working there.

0

The header redirect is directing back to the "phoneupdate.php" file, where it should.

0

Do you have it working on your side? This is just too weird.

0

Well I'll be dipped. Ok, so I must have something different on my end that causes it to not work. What should I look for? Any ideas?

0

pass me the script you are using for updatephone.php (the first form), let me see if what you have is different than mine.

0
<?php
error_reporting(E_ALL);
// Show simple format of the records so person can choose the reference name/number
// this is then passed to the next page, for all details

$host = "localhost"; 
$user = "xxx"; 
$pass = "xxx"; 
$db = "phonebook"; 

//Connecting to MYSQL
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");

//Select the database we want to use
mysql_select_db($db) or die ("Could not find database");

// Get all records in all columns from table and put it in $result.
$query = "SELECT * FROM people ORDER BY fname ASC"; 

// execute query 
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); 

// Get all records in all columns from table and put it in $result.

if (mysql_num_rows($result) > 0) {
  while($row=mysql_fetch_row($result)){
    echo "ID : $row[0] <br/>";
    echo "First Name : $row[1] <br/>";
    echo "Last Name : $row[2] <br/>";
    echo "Phone Number : $row[3] <br/>";
    echo "Extension : $row[4] <br/>";
    echo "Title : $row[5] <br/>";
    echo "Department : $row[6] <br/>";
    echo "Fax Number : $row[7] <hr>";
    // Add a link with a parameter(id) and it's value.
    echo '<a href="phoneupdate1.php?id='.$row[0].'">Update</a>';
  }
} else { 
  // no 
  // print status message 
  echo "No rows found!";
} 
//mysql_close();
?>
0

I just don't get it, i'm using the same exact scripts you are and I'm not getting the data in the second form. I'm lost on this one.

0

Ok, i figured it out. I had to turn on short tags in the php.ini file. I belive that did the trick. So now all i need to do is redo the tags and I should be good.

Xan, you are the man, thank you so much for working so hard on this, i really appreciate it, you've been a great help.

thumbs up to you.

0

ah ok, didn't even think about that being turned off as it is usually on by default. :)

Me neither, not sure how I came across it to begin with :) , but all is good now.

I know there are a lot of folks wanting this type of script, is there somewhere we can put it out for others to use now that it is working?

Again, thanks for all your help. Take it easy.

0

By chance are you able to submit a change to the data. I'm still getting a "page cannot be displayed" error after clicking submit. I've got other tasks to do for the rest of today so I'll have to get back on it on Monday. Have a great weekend.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.