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 423,579 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,410 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: 283 | Replies: 5
Reply
Join Date: Apr 2008
Posts: 12
Reputation: prethum is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
prethum prethum is offline Offline
Newbie Poster

plz help me with this code

  #1  
Apr 18th, 2008
hi
i have a problem i need the same thing pop up a windoow when user clicks the link
hear is my code plz tell me if i made a mistake
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?
  6. $company= $_REQUEST['companytype'];
  7. $companytype =mysql_real_escape_string($company);
  8. echo "<h1> <font color=green>Results For $companytype</font></h1>";
  9. $query = "SELECT companyname,companytype,address,kommun,postcode,telephone
  10. FROM addreg where companytype ='$companytype' ORDER BY id desc limit 0,5";
  11. $result = mysql_query($query);
  12. echo mysql_error();
  13. echo "<table width='100%' border='0'>";
  14.  
  15.  
  16. while($row = mysql_fetch_array($result))
  17. {
  18. echo "Companytype :"."<a href= 'houseinfo.php?companytype=".$row["companytype"]."'></a>". "<br>";
  19. echo "Companyname : " .$row['companyname'] . '<br>';
  20. echo "Address : " .$row['address'] . '<br>';
  21. echo "Telephone : " .$row['telephone'] . '<br>';
  22. echo "<img src='img/divv.jpg'>"."<br>";
  23. }
  24. echo '<br>';
  25. ?>
  26. </body>
  27. </html>
when the user clicks the 'companyname' a window should pop out showing the details ,but i dont output anything can some one help.
Last edited by peter_budo : Apr 20th, 2008 at 11:41 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2008
Posts: 48
Reputation: helraizer is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
helraizer helraizer is offline Offline
Light Poster

Re: plz help me with this code

  #2  
Apr 18th, 2008
Do you just want the link to open in a new window? (new tab in newer browsers) Or are you wanting a 'pop-up box'?

Sam
Last edited by helraizer : Apr 18th, 2008 at 7:35 am.
Reply With Quote  
Join Date: Apr 2008
Posts: 12
Reputation: prethum is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
prethum prethum is offline Offline
Newbie Poster

Re: plz help me with this code

  #3  
Apr 18th, 2008
just want to pop up a box which also display the image of the company
Reply With Quote  
Join Date: Apr 2008
Posts: 48
Reputation: helraizer is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
helraizer helraizer is offline Offline
Light Poster

Re: plz help me with this code

  #4  
Apr 18th, 2008
Ah, I see.

You closed your </a> before the Company Name.

So where you have

  1. echo "Companytype :"."<a href= 'houseinfo.php?companytype=".$row["companytype"]."'></a>". "<br>";
  2. echo "Companyname : " .$row['companyname'] . '<br>';

you should have

  1. echo "Companytype : <a href= 'houseinfo.php?companytype=".$row["companytype"]."'><br>";
  2. echo "Companyname : " .$row['companyname'] . '</a><br>';

Assuming I've understood correctly, that should be it, now.

Sam
Last edited by helraizer : Apr 18th, 2008 at 8:40 am.
Reply With Quote  
Join Date: Apr 2008
Posts: 12
Reputation: prethum is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
prethum prethum is offline Offline
Newbie Poster

Re: plz help me with this code

  #5  
Apr 18th, 2008
thankyou very much
that one is sloved
Reply With Quote  
Join Date: Apr 2008
Posts: 48
Reputation: helraizer is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
helraizer helraizer is offline Offline
Light Poster

Re: plz help me with this code

  #6  
Apr 18th, 2008
Originally Posted by prethum View Post
thankyou very much
that one is sloved


Glad I could help. =)

*mark as solved*
Reply With Quote  
Reply

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

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

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

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