Jump to content


alexweb13

Member Since 27/10/2011
Offline Last Active 28/10/2011, 17:30
-----

Topics I've Started

Erro Pagina Php (Mais.Php)

27/10/2011, 10:18

Attached File  mais.php   4.98KB   3 downloadsOlá companheiros abaixo o código com erro no mais.php de uma pagina de carros
espero que esta duvida me ajude a ajude outras pessoas, estou estudando php iniciante, em breve espero esta ajudando neste forum e construindo projetos

forte abraço
<?
@INCLUDE ("includes/barracima.php");
@INCLUDE ("includes/config.php");
@INCLUDE ("includes/abrebanco.php");

$info = $numero;
$sql_mais = "select * from automoveis where id='$info'";
$exe_mais = mysql_query($sql_mais);
$mais = mysql_result($exe_mais,0,"marca");
$mais2 = mysql_result($exe_mais,0,"modelo");
$mais3 = mysql_result($exe_mais,0,"categoria");
$mais4 = mysql_result($exe_mais,0,"tipo");

$sql_marca = "select * from marcas where id='$mais'";
$exe_marca = mysql_query($sql_marca);

$sql_mod = "select * from modelos where id='$mais2'";
$exe_mod = mysql_query($sql_mod);

$sql_categ = "select * from categorias where id='$mais3'";
$exe_categ = mysql_query($sql_categ);

$sql_tipo = "select * from tipos where id='$mais4'";
$exe_tipo = mysql_query($sql_tipo);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="150" valign="top">
<?
include ("includes/barraesq.php");
?>
</td>
<td height="100%" valign="top"> <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>

<td height="100%" align="center" valign="top" bgcolor="#FFFFFF"> <br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="imagens/tit_adm_autos.gif" width="456" height="27"></td>
</tr>
</table>
<br>
<?=$fonte02?>
<b>Mais informa&ccedil;&otilde;es sobre o autom&oacute;vel</b><br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
$foto = mysql_result($exe_mais,0,"foto");
if ($foto != ""){
?>
<tr><td width="0%">&nbsp;</td>
<td colspan='2' align='center' bgcolor='#DBDBDB'><img src="<?=$foto?>" width="300" border="1" bordercolor="<?=$table?>"></td>
<td width="1%">&nbsp;</td></tr>
<?
}
?>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#EDEDED"><?=$fonte02?>
&nbsp;<b>Marca:</b></td>
<td width="78%" bgcolor="#EDEDED"> <?=$fonte02?> <?=mysql_result($exe_marca,0,"marca")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#DBDBDB"><?=$fonte02?> &nbsp;<b>Modelo:</b></td>
<td width="78%" bgcolor="#DBDBDB"> <?=$fonte02?> <?=mysql_result($exe_mod,0,"modelo")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#EDEDED"><?=$fonte02?> &nbsp;<b>Ano:</b></td>
<td width="78%" bgcolor="#EDEDED"> <?=$fonte02?> <?=mysql_result($exe_mais,0,"ano")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#DBDBDB"><?=$fonte02?> &nbsp;<b>Cor:</b></td>
<td width="78%" bgcolor="#DBDBDB"> <?=$fonte02?> <?=mysql_result($exe_mais,0,"cor")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#EDEDED"> <?=$fonte02?> &nbsp;<b>Pre&ccedil;o:</b></td>
<td width="78%" bgcolor="#EDEDED"> <?=$fonte02?> <?=mysql_result($exe_mais,0,"preco")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#DBDBDB"> <?=$fonte02?> &nbsp;<b>Descri&ccedil;&atilde;o:</b></td>
<td width="78%" bgcolor="#DBDBDB"> <?=$fonte02?> <?=mysql_result($exe_mais,0,"descricao")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#EDEDED"> <?=$fonte02?> &nbsp;<b>Categoria:</b></td>
<td width="78%" bgcolor="#EDEDED"> <?=$fonte02?> <?=mysql_result($exe_categ,0,"categoria")?> </td>
<td width="1%">&nbsp;</td>
</tr>
<tr>
<td width="0%">&nbsp;</td>
<td width="21%" bgcolor="#DBDBDB"> <?=$fonte02?> &nbsp;<b>Tipo:</b></td>
<td width="78%" bgcolor="#DBDBDB"> <?=$fonte02?> <?=mysql_result($exe_tipo,0,"tipo")?> </td>
<td width="1%">&nbsp;</td>
</tr>
</table>
<br>
<?=$fonte02?>
<a href="javascript:history.back(1)"><b>voltar<br>
<br></b></a></td>
</tr>
</table></td>
<td width="152" valign="top" background="imagens/fundo_barra_dir.gif">
<?
@include ("includes/barradir.php");
?></td>
</tr>
</table>
<?
@INCLUDE ("includes/rodape.php");
?>

IPB Skin By Virteq