473,322 Members | 1,493 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,322 software developers and data experts.

Getting blank when hyperlinking in PHP

I used the following command to hyperlink
Expand|Select|Wrap|Line Numbers
  1. $result_id1 = mysql_query("SELECT * FROM query order by case_id");
  2. for ($i=0; $row1=mysql_fetch_array($result_id1); $i++)
  3. {
  4. //case_no is a field in the table "query"
  5. echo "<TD><b><a href='http://localhost/test/details.php?case=$row1[case_no]'> $row1[case_no]</a></b> </TD>";
  6. }
now the file details.php is something like:

Expand|Select|Wrap|Line Numbers
  1. $case= $_REQUEST['case'];
  2. // after the connection and all
  3. $result_new = mysql_query("SELECT * FROM query WHERE case_no = '$case'") or die ("Error: ".mysql_error());
  4. $row=mysql_fetch_array($result_new);
After i do this, I am getting a blank when i try to display a field of the table "date_rec"

Expand|Select|Wrap|Line Numbers
  1. echo $row[date_rec];

please help me out asap...
Feb 28 '11 #1
3 1183
dgreenhouse
250 Expert 100+
I don't see where you've referenced "date_rec" anywhere in your code.

The following creates a valid link:
Expand|Select|Wrap|Line Numbers
  1. $row1['case_no'] = "hello";
  2.  
  3. echo "<TD><b><a href='http://localhost/test/details.php?case=$row1[case_no]'> $row1[case_no]</a></b> </TD>";
  4.  
Feb 28 '11 #2
see "case_id","case_no" and "date_rec" are the fields in the table "query"
Mar 1 '11 #3
deric
92
Try this...
Expand|Select|Wrap|Line Numbers
  1. echo $row["date_rec"];
  2.  
http://php.net/manual/en/function.mysql-fetch-array.php
Mar 1 '11 #4

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

Similar topics

5
by: ChadDiesel | last post by:
My basic question is why does my print report button on my subform print a blank report when my cursor is on a blank entry line? Here is a more detailed explanation of my problem. I have a...
1
by: dipesh | last post by:
I am getting error when trying to Add Web Reference in Visual Studio 2005. "Some of the files required for web references are not installed"
5
by: sara | last post by:
I've looked at all the posts I could and don't see the solution. I am aware that the format to get a BLANK when the number is 0 is: $ #,###.00;($ #,###.00);"" But I can't, for the life of me,...
4
by: pagates | last post by:
Hello All, Before I post a console app that demonstrates this problem, can anybody see any problems with what I am doing below? private string GetFileType(string Path) { SHFILEINFO shfi =...
1
by: jonny | last post by:
Went from using Visual Web Develop express to Visual Studio 2005 and getting error when trying to open project. Error message: "One or more projects in the solution could not be loaded for the...
6
by: briggal1 | last post by:
Hi I wonder if anyone can help. I have a report in Access 2000, which works perfectly and displays all the information until I select a period where one, or more, of the fields is blank. ...
0
by: =?Utf-8?B?UmF2aQ==?= | last post by:
Hi, I have WCF service and integrated with STS (WS-Federation). The Service exposes 5 endpoints Win, UNT and Federated Windows, Federated UNT and Mex endpoint. My STS Service exposes 3 endpoints...
1
n8kindt
by: n8kindt | last post by:
i just spent nearly 3hrs trying to debug this problem so i figured i would post this just in case someone else has the same problem in the future. if you're trying to output binary data as an image...
3
by: shwethatj | last post by:
Can anyone help me please .... My vb.net application is getting closed when i trying to run the solution ... What might be the problem ... Am new to .net .. Regards, Shwetha
4
by: sumit kale | last post by:
Hi, Can somebody help me resolve my problem ? I am getting error when calculating total using unbound textfiled in subform. I have a main form called purchase_register_master and a subform...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.