Solved

HTML , open new page with content from database

Posted on 2013-01-16
2
159 Views
Last Modified: 2013-01-16
Hi ,
I am getting the some data from my database using this

       $date_  =mysql_result($result,$i,"Date");
       ...
        $message =mysql_result($result,$i,"Message");

When displaying , I want by clicking on date, a new window opens and its content is the $message ,
so instead of displaying the content of "www.experts-exchange.com", it shows the content of $message


<td><a href="http://www.experts-exchange.com" target="_blank"><?echo $date_ ?></a></td>

Your help is really appreciated.
Screen-Shot-2013-01-16-at-10.18..png
0
Comment
Question by:fparvini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Author Comment

by:fparvini
ID: 38783901
Hi,
I tried this

<script>
function openWin(content)
{
myWindow=window.open('','','width=600,height=600');
myWindow.document.write(content);
myWindow.focus();
}
</script>

<td><a href="#" onclick='openWin("<?php echo $message?>")';return false"><?echo $date_ ?></a></td>


but get error message
0
 

Accepted Solution

by:
fparvini earned 0 total points
ID: 38784532
Hi,

Fixed it

$message = mysql_result($result,$i,"Message");
        $message = nl2br(preg_replace('#(\\r\\n|\\r|\\n)#', '<br/>', $message));
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question