|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I don't know much of either one of this technologies. This is what I
got so far. The "Click Here!" link does not reflect the value of the variable. I have tried many variations but not avail. ! There is the page test if you want to look of the output of this code: http://www.goji3000.com/Atestgojicreated.php You could email me direct to: norberto_rivera@yahoo.com Here is the code: +++++++++++++++++++++++++++++++++++++++++++++++ <html> <title>HTML with PHP</title> <body> <h1>My Example</h1> <?php // Connects to your Database mysql_connect("LOCALHOST", "USERNAME", "PASSWORD") or die(mysql_error()); mysql_select_db("socios") or die(mysql_error()); $data = mysql_query("SELECT * FROM `informacion` WHERE `key` = 4472548") or die(mysql_error()); Print "<table border cellpadding=3>"; while($info = mysql_fetch_array( $data )) { Print "<tr>"; Print "<th>key:</th> <td>".$info['key'] . " </td></tr>"; Print "<th>name:</th> <td>".$info['nombre'] . " </td></tr>"; Print "<th>website:</th> <td>".$info['website'] . " </td></tr>"; } Print "</table>"; ?> <b>These is HTML</b> <a href= (.$info['website'].) > click here! </a></tr> </body> </html> ++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Norberto_Rivera@yahoo.com wrote:
> while($info = mysql_fetch_array( $data )) > { > Print "<tr>"; > Print "<th>key:</th> <td>".$info['key'] . " </td></tr>"; > Print "<th>name:</th> <td>".$info['nombre'] . " </td></tr>"; > Print "<th>website:</th> <td>".$info['website'] . " </td></tr>"; echo "<tr><th><a href='{$info['website']}'>blah blah</a></th>"; > } > Print "</table>"; > ?> > > <b>These is HTML</b> > <a href= (.$info['website'].) > click here! </a></tr> You're not into PHP: you've written the "?>" tag! By the way, check your HTML - you're not outputting any new <tr>s, but lots of </tr>s... -- ---------------------------------- Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- Un ordenador no es un televisor ni un microondas, es una herramienta compleja. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Feb 15, 1:26pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote: > Norberto_Riv...@yahoo.com wrote: > > while($info = mysql_fetch_array( $data )) > > { > > Print "<tr>"; > > Print "<th>key:</th> <td>".$info['key'] . " </td></tr>"; > > Print "<th>name:</th> <td>".$info['nombre'] . " </td></tr>"; > > Print "<th>website:</th> <td>".$info['website'] . " </td></tr>"; > > echo "<tr><th><a href='{$info['website']}'>blah blah</a></th>"; > > > } > > Print "</table>"; > > ?> > > > <b>These is HTML</b> > > <a href= (.$info['website'].) > click here! </a></tr> > > You're not into PHP: you've written the "?>" tag! > > By the way, check your HTML - you're not outputting any new <tr>s, but lots > of </tr>s... > > -- > ---------------------------------- > Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- > > Un ordenador no es un televisor ni un microondas, es una herramienta > compleja. I did modify the page with your advise. I now I can see the link but still does not work because the begining of the link include the website where my page is located. I am so close that I can taste it. You could visit again the test page and see what I am talking about. http://www.goji3000.com/Atestgojicreated.php |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Norberto_Rivera@yahoo.com wrote:
> I did modify the page with your advise. I now I can see the link but > still does not work because the begining of the link include the website > where my page is located. That's not the reason. You're outputting this right now: <a href=' www.joserivas.freelife.com'>Click Here!</a> But if you know some very basic HTML, you know that you really want to output this: <a href='http://www.joserivas.freelife.com'>Click Here!</a> (If in doubt, consult any HTML book about absolute vs. relative linking) -- ---------------------------------- Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- Proudly running Debian Linux with 2.6.24-1-amd64 kernel, KDE 3.5.8, and PHP 5.2.5-2 generating this signature. Uptime: 18:54:29 up 1 day, 6:29, 2 users, load average: 1.12, 0.59, 0.48 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Feb 15, 1:56pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote: > Norberto_Riv...@yahoo.com wrote: > > I did modify the page with your advise. I now I can see the link but > > still does not work because the begining of the link include the website > > where my page is located. > > That's not the reason. You're outputting this right now: > > <a href='www.joserivas.freelife.com'>Click Here!</a> > > But if you know some very basic HTML, you know that you really want to > output this: > > <a href='http://www.joserivas.freelife.com'>Click Here!</a> > > (If in doubt, consult any HTML book about absolute vs. relative linking) > > -- > ---------------------------------- > Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- > > Proudly running Debian Linux with 2.6.24-1-amd64 kernel, KDE 3.5.8, and PHP > 5.2.5-2 generating this signature. > Uptime: 18:54:29 up 1 day, 6:29, 2 users, load average: 1.12, 0.59, 0.48 Ok. Let me start reading. Thanks for your . |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Feb 15, 1:56pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote: > Norberto_Riv...@yahoo.com wrote: > > I did modify the page with your advise. I now I can see the link but > > still does not work because the begining of the link include the website > > where my page is located. > > That's not the reason. You're outputting this right now: > > <a href='www.joserivas.freelife.com'>Click Here!</a> > > But if you know some very basic HTML, you know that you really want to > output this: > > <a href='http://www.joserivas.freelife.com'>Click Here!</a> > > (If in doubt, consult any HTML book about absolute vs. relative linking) > > -- > ---------------------------------- > Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- > > Proudly running Debian Linux with 2.6.24-1-amd64 kernel, KDE 3.5.8, and PHP > 5.2.5-2 generating this signature. > Uptime: 18:54:29 up 1 day, 6:29, 2 users, load average: 1.12, 0.59, 0.48 You got it, man. It works. Thanks for your time. This is great. And really, I don't know anything about this languages or hypertext o what ever they call it now. thanks again. |
|
![]() |
| Outils de la discussion | |
|
|