Hi all,
Not even sure if this can be done, but I have a Results.php page that includes a line:
"My task, [<?php echo $row_Recordset1['Task'];?>], is in the top [<?php echo $row_Recordset1['RankPercent']; ?>] of tasks in the company";
...where the php tags represent results from a MySQL search.
How do I send this as html to a mini-popup window so that the people can send it to their friends on facebook/twitter/etc?
NOTE: the issue here isn't in creating a popup page - I can do this.
What I need to be able to do is pass that sentence to the popup.php page "exactly" as it appears on the page when rendered.
I have been experimenting down the...
$text = "My task, [<?php echo $row_Recordset1['Task'];?>], is in the top [<?php echo $row_Recordset1['RankPercent']; ?>] of tasks in the company";
...route, but this just gives a load of parse errors (predicably enough).
Any thoughts?
I don't know php, but in most other languages variables should not appear within double quotes, otherwise they are interpreted as literal. So maybe:
$text = "My task, [" . <?php echo $row_Recordset1['Task'];?> . "], is in the top [" . <?php echo $row_Recordset1['RankPercent']; ?> . "] of tasks in the company";
Actually, that's pretty good! There is a slight syntax error - the first <?php doesn't seem to render properly (in fact, the second one looks good until you take the first one out, and then it develops the same problem as the first one did...). Any cloues?
If not, don't worry - I'm sure I can debug it from here, but if you can think of anything I'd love to hear it. It seems to be something to do with the double quotes...
North America
Europe, Middle East and Africa
Asia Pacific