Jump to content

error.... =(


ragekc

Recommended Posts

HERE´S MY CODE:<? $hostname = "localhost"; $dbname = "bd_clientes"; $username = ""; $password = ""; MYSQL_CONNECT($hostname, $username, $password) OR DIE("Nao pude conectar"); @mysql_select_db( "$dbname") or die( "Nao pude selecionar o banco de dados"); $query = "SELECT MAX(codigocliente) FROM tblsorteio" ; $result = MYSQL_QUERY($query); $row = mysql_fetch_array($result); ?> <html><head><title>Resultado</title></head><body><center><h1>Lista de Pessoas Cadastradas</h1></center> <? echo $row[codigocliente]; ?> </body></html>NO RESULT IS SHOWN!!I GUESS THE PROBLEM MUST BE IN THE $row[codigocliente] PART..CAN SOMEONE PLEASE HELP ME??THAANKS

Link to comment
Share on other sites

And what about the array fetch? Would it work if you change it to this?

$row = mysql_fetch_array($result,MYSQL_ASSOC);
Next, full PHP tags will always work, short ones only if the short tags are enabled, so if you'd use only full tags, you're always save :)<?php and ?> Edited by Dan The Prof
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...