473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem opening in new page

I have made a search page. Result of search displays the name of users along with their experience. if a user clicks on any name then a new browser page is opened and the details of that user are dipalyed. So now there are 2 pages open: 1 is the result page and the other is details page. If the user again clicks on other user name then that users details are shown on the same page on which it was showing previously. Now there should be 3 pages opened: 1 of result page, 1 of 1st users details and 1 of 2nd users details but there are only 2 pages opened. The details of 1st user is lost. How can it be solved. This is the following code that i have used for it.

Expand|Select|Wrap|Line Numbers
  1. $resultnum = mysql_num_rows($data); 
  2. if($resultnum>0) { // Echos out matches if anything was found
  3. while($info=mysql_fetch_array($data)){
  4. ?>
  5.       <tr>
  6.         <td width="139" height="26" valign="top"><p align="center"><a href="searchaccount.php?id=<? echo $info['FullName']; ?>" target=\"_blank\"><? echo $info['FullName']; ?></a></p></td>
  7.         <td width="149" valign="top"><p align="center"><? echo $info['YearsExp']; ?></p></td>
  8.       </tr>
  9.       <p>&nbsp;</p>
  10.       <?php
  11. }// end of while
  12. }//end of if
  13.  
What is the problem in above code.
Apr 14 '08 #1
3 990
Markus
6,050 Expert 4TB
This isn't a php problem.

Can you clarify:

User clicks on a username on the results page(p1), this opens a new window with the users details(p2).
The user then clicks on another username on the results page(p1), and this then reloads the previous user details in p2.

That the problem?
Apr 14 '08 #2
I have made a search page. Result of search displays the name of users along with their experience. if a user clicks on any name then a new browser page is opened and the details of that user are dipalyed. So now there are 2 pages open: 1 is the result page and the other is details page. If the user again clicks on other user name then that users details are shown on the same page on which it was showing previously. Now there should be 3 pages opened: 1 of result page, 1 of 1st users details and 1 of 2nd users details but there are only 2 pages opened. The details of 1st user is lost. How can it be solved. This is the following code that i have used for it.

Expand|Select|Wrap|Line Numbers
  1. $resultnum = mysql_num_rows($data); 
  2. if($resultnum>0) { // Echos out matches if anything was found
  3. while($info=mysql_fetch_array($data)){
  4. ?>
  5.       <tr>
  6.         <td width="139" height="26" valign="top"><p align="center"><a href="searchaccount.php?id=<? echo $info['FullName']; ?>" target=\"_blank\"><? echo $info['FullName']; ?></a></p></td>
  7.         <td width="149" valign="top"><p align="center"><? echo $info['YearsExp']; ?></p></td>
  8.       </tr>
  9.       <p>&nbsp;</p>
  10.       <?php
  11. }// end of while
  12. }//end of if
  13.  
What is the problem in above code.

Well, I don't think that a link not following through in a new page / tab is a PHP issue at all. It looks to me like you're building your link a bit awkwardly. There is no need to escape the quotes on the target value when you are printing it to the browser with direct HTML.
Apr 15 '08 #3
This isn't a php problem.

Can you clarify:

User clicks on a username on the results page(p1), this opens a new window with the users details(p2).
The user then clicks on another username on the results page(p1), and this then reloads the previous user details in p2.

That the problem?
User clicks on a username on the results page(p1), this opens a new window with the users details(p2).
The user then clicks on another username on the results page(p1), and this then reloads the user details of new user in p2. It should be in p3.
p2 should still contain the same user details.
Sorry for being unclear
Apr 15 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Eric Tuomikoski | last post by:
Im having trouble with server side ASP with Javascript. I have an ADO recordset that returns a list of Times example: 7:00AM. I then populate the option box with the results. (see below) The...
5
by: John Morgan | last post by:
I am using the following link to download a file of about 50k <a target= "_blank" href="http://www.bsecs.org.uk/ExecDocs/documentStore/elfridaWord.doc">open file</a> If I save the file to...
1
by: Jack | last post by:
Hi, I'm having a problem with web page navigation. Senario: I have one web page (webpage1.aspx) which hosts a control containing a datagrid with a list of charges. Underneath the datagrid...
0
by: melanieab | last post by:
Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus...
4
by: MrL8Knight | last post by:
Hello, I am trying to build a simple php form based shopping cart using a cookie with arrays. I need to use 1 cookie because each order will have over 20 items. With that said, I realize I need to...
8
by: John | last post by:
hi Everybody, I just made a simple web site using Frontpage 2003 with a simple MS Accesss database. IF I try to open the asp page in a browser by typing http://localhost/mysite/db.asp it...
11
by: emailus | last post by:
I am webmaster for the domain <www.alpha1.org.au>. Not being an expert in html, I take advantage of my domain Registrant's web building tool, 'Instant Website'. This tool is provided as part of...
0
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table...
1
by: KavithaSing | last post by:
Hi everyone, In our website we have an option ‘official login’ for users to login and send information through the site. We face the following problem while loggin in. We use the following...
1
by: past123in | last post by:
I am facing problem in the following code <a href="" onClick="openWindow('../NavigationalPages/Contact Us.html',435,820);" title="Contact us for any assistance" target="_blank"> When i click on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.