bueno amigo andaba creando un sistema de noticias para mi pag pero me salieron algunos errores aqui les dejare los archivo y sus errores
mipagina.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
}
-->
</style></head>
<body>
<table width="39%" border="1" align="center" cellpadding="5" cellspacing="2" bordercolor="#0066FF">
<tr bgcolor="#71B8FF">
<td><div align="center">Noticias</div></td>
</tr>
<tr><td align="left" valign="top">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><?php
mysql_connect("mysql.webcindario.com","nueva_noticias");
mysql_select_db('nueva_noticias');
$re=mysql_query('select * from noticias order by id desc limit 0 ,3 ');
while($f=mysql_fetch_array($re)){
echo '<tr>'.$f['fecha'].'</td><br />';
echo '<tr><a href="noticia.php?id='.$f['id'].'">'.$f['titulo'].'</a></td></tr><br /><br />';
}
echo'<a href="todas.php">mas noticias</a>';
?></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"></div>
</body>
</html>
Error:
http://nueva-noticias.webcindario.com/mipagina.phpnoticia.php
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php
mysql_connect("mysql.webcindario.com","nueva_noticias");
mysql_select_db('nueva_noticias');
$re=mysql_query('select * from noticias where id ="'.$_GET['id'].'" ');
while($f=mysql_fetch_array($re)){
echo '<tr>'.$f['fecha'].'</td><br />';
echo '<tr>'.$f['titulo'].'</td></tr><br /><br />';
echo '<tr>'.$f['noticia'].'</td></tr><br /><br />';
}
?>
</td>
</tr>
</table>
Error:
http://nueva-noticias.webcindario.com/noticia.phpWarning: mysql_connect() [function.mysql-connect]: Access denied for user 'nueva_noticias'@'192.168.0.61' (using password: NO) in /home/webcindario/n/u/nueva-noticias/noticia.php on line 4
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'apache'@'192.168.0.61' (using password: NO) in /home/webcindario/n/u/nueva-noticias/noticia.php on line 5
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/webcindario/n/u/nueva-noticias/noticia.php on line 5
Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'192.168.0.61' (using password: NO) in /home/webcindario/n/u/nueva-noticias/noticia.php on line 6
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/webcindario/n/u/nueva-noticias/noticia.php on line 6
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/webcindario/n/u/nueva-noticias/noticia.php on line 7
sistnoticias.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mis noticias</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script src="ckeditor/_samples/sample.js" type="text/javascript"></script>
<link href="ckeditor/_samples/sample.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- This <fieldset> holds the HTML that you will usually find in your
pages. -->
<form action="sistnoticias.php" method="post">
<p>
<label for="editor1">Sistemas de noticia </label>
</p>
<p>
<label>
titulo
<input name="titulo" type="text" id="titulo" />
</label>
<br/>
<textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>
<script type="text/javascript">
//<![CDATA[
// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace( 'editor1' );
//]]>
</script>
</p>
<p>
<label for="editor2"></label><input type="submit" value="Publicar"/>
<a href="mipagina.php">ver noticia </a></p>
</form>
<?php
$noticia = $_POST['editor1'];
$fecha=date('y-m-d');
$titulo=$_POST['titulo'];
if($noticia!="" and $titulo!=""){
mysql_connect("mysql.webcindario.com","nueva_noticias");
mysql_select_db('nueva_noticias');
mysql_query("insert into noticias(titulo,fecha,noticia) values('$titulo','$fecha','$noticia')");
}
?>
<div id="footer"></div>
</body>
</html>
Error:
http://nueva-noticias.webcindario.com/sistnoticias.phpAl publicar un mensaje sale lo siguiente:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nueva_noticias'@'192.168.0.62' (using password: NO) in /home/webcindario/n/u/nueva-noticias/sistnoticias.php on line 51
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'apache'@'192.168.0.62' (using password: NO) in /home/webcindario/n/u/nueva-noticias/sistnoticias.php on line 52
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/webcindario/n/u/nueva-noticias/sistnoticias.php on line 52
Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'192.168.0.62' (using password: NO) in /home/webcindario/n/u/nueva-noticias/sistnoticias.php on line 53
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/webcindario/n/u/nueva-noticias/sistnoticias.php on line 53
todas.php
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php
mysql_connect("mysql.webcindario.com","nueva_noticias");
mysql_select_db('nueva_noticias');
$re=mysql_query('select * from noticias order by id desc ');
while($f=mysql_fetch_array($re)){
echo '<tr>'.$f['fecha'].'</td><br />';
echo '<tr><a href="noticia.php?id='.$f['id'].'">'.$f['titulo'].'</a></td></tr><br /><br />';
}
?>
</td>
</tr>
</table>
Erro:
http://nueva-noticias.webcindario.com/todas.phpWarning: mysql_connect() [function.mysql-connect]: Access denied for user 'nueva_noticias'@'192.168.0.65' (using password: NO) in /home/webcindario/n/u/nueva-noticias/todas.php on line 4
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'apache'@'192.168.0.65' (using password: NO) in /home/webcindario/n/u/nueva-noticias/todas.php on line 5
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/webcindario/n/u/nueva-noticias/todas.php on line 5
Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'192.168.0.65' (using password: NO) in /home/webcindario/n/u/nueva-noticias/todas.php on line 6
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/webcindario/n/u/nueva-noticias/todas.php on line 6
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/webcindario/n/u/nueva-noticias/todas.php on line 7
Bueno si ahy alguien que me ayude se lo pido =D
