PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > : Creating a web link using HTML, php and MySQL.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
: Creating a web link using HTML, php and MySQL.

Réponse
 
LinkBack Outils de la discussion
Vieux 15/02/2008, 17h19   #1
Norberto_Rivera@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut : Creating a web link using HTML, php and MySQL.

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>
++++++++++++++++++++++++++++++++++++++++++++++
  Réponse avec citation
Vieux 15/02/2008, 17h26   #2
Iván Sánchez Ortega
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: : Creating a web link using HTML, php and MySQL.

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.
  Réponse avec citation
Vieux 15/02/2008, 17h49   #3
Norberto_Rivera@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: : Creating a web link using HTML, php and MySQL.

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

  Réponse avec citation
Vieux 15/02/2008, 17h56   #4
Iván Sánchez Ortega
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: : Creating a web link using HTML, php and MySQL.

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

  Réponse avec citation
Vieux 15/02/2008, 18h09   #5
Norberto_Rivera@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: : Creating a web link using HTML, php and MySQL.

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 .
  Réponse avec citation
Vieux 15/02/2008, 18h27   #6
Norberto_Rivera@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: : Creating a web link using HTML, php and MySQL.

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.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h09.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13206 seconds with 14 queries