par
Cyrano » 01 juin 2005, 12:10
Bon, voilà quelque chose qui marche: je te laisse piocher dedans ce dont tu as besoin, en fait, j'ai remplacé le bouton type image par un lien avec image tout court et ça fonctionne avec IE aussi bien qu'avec FireFox:
<?php
echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" xml:lang="fr" />
<title>Formulaire avec bouton de soummission en image</title>
</head>
<body>
<form name='client' action='<?php echo($_SERVER['PHP_SELF']); ?>' method='post'>
<?php
if(!empty($_POST['login']))
{
echo("<pre>");
var_dump($_POST);
echo("</pre>");
?>
<p>Test réussi.</p>
<?php
}
else
{
?>
<p>Test raté.</p>
<?php
}
if(empty($_POST['login']))
{
?>
<table border='1' width='430' cellspacing='5' class='texte'>
<tr>
<td colspan='2'>Veuillez entrer votre login et mot de passe pour accéder à votre compte.</td>
</tr>
<tr>
<td width='33%' align='right'> login : </td>
<td><input type='text' value='' name='login'></td>
</tr>
<tr>
<td align='right'> mot de passe : </td>
<td><input type='password' value='' name='pass'></td>
</tr>
<tr>
<td colspan='2' height='50' align='center'>
<a href="#" onClick="document.forms['client'].submit();"><img src="../../_Temporaire/images/Logo_25blk_google.gif" style="border: none"></a>
</td>
</tr>
</table>
<?php
}
?>
</form>
</body>
</html>
Bon, voilà quelque chose qui marche: je te laisse piocher dedans ce dont tu as besoin, en fait, j'ai remplacé le bouton type image par un lien avec image tout court et ça fonctionne avec IE aussi bien qu'avec FireFox:
[php]<?php
echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" xml:lang="fr" />
<title>Formulaire avec bouton de soummission en image</title>
</head>
<body>
<form name='client' action='<?php echo($_SERVER['PHP_SELF']); ?>' method='post'>
<?php
if(!empty($_POST['login']))
{
echo("<pre>");
var_dump($_POST);
echo("</pre>");
?>
<p>Test réussi.</p>
<?php
}
else
{
?>
<p>Test raté.</p>
<?php
}
if(empty($_POST['login']))
{
?>
<table border='1' width='430' cellspacing='5' class='texte'>
<tr>
<td colspan='2'>Veuillez entrer votre login et mot de passe pour accéder à votre compte.</td>
</tr>
<tr>
<td width='33%' align='right'> login : </td>
<td><input type='text' value='' name='login'></td>
</tr>
<tr>
<td align='right'> mot de passe : </td>
<td><input type='password' value='' name='pass'></td>
</tr>
<tr>
<td colspan='2' height='50' align='center'>
<a href="#" onClick="document.forms['client'].submit();"><img src="../../_Temporaire/images/Logo_25blk_google.gif" style="border: none"></a>
</td>
</tr>
</table>
<?php
}
?>
</form>
</body>
</html>
[/php]