User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 374,193 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,539 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1089 | Replies: 48 | Solved
Reply
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #41  
May 9th, 2008
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?
Reply With Quote  
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #42  
May 9th, 2008
pass me the script you are using for updatephone.php (the first form), let me see if what you have is different than mine.
Reply With Quote  
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #43  
May 9th, 2008
Sorry thats "phoneupdate.php". my bad.
Reply With Quote  
Join Date: May 2008
Location: UK
Posts: 51
Reputation: xan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 10
xan's Avatar
xan xan is offline Offline
Junior Poster in Training

Re: a little help

  #44  
May 9th, 2008
<?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();
?>
Reply With Quote  
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #45  
May 9th, 2008
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.
Reply With Quote  
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #46  
May 9th, 2008
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.
Reply With Quote  
Join Date: May 2008
Location: UK
Posts: 51
Reputation: xan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 10
xan's Avatar
xan xan is offline Offline
Junior Poster in Training

Re: a little help

  #47  
May 9th, 2008
ah ok, didn't even think about that being turned off as it is usually on by default.
Reply With Quote  
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #48  
May 9th, 2008
Originally Posted by xan View Post
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.
Reply With Quote  
Join Date: Jan 2008
Posts: 76
Reputation: rickarro is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
rickarro rickarro is offline Offline
Junior Poster in Training

Re: a little help

  #49  
May 9th, 2008
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC