01.05.2009 to 20:08  #6407
Gast Chris2010
Gast

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
hallo weiß einer was das heißs bitte

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /usr/export/www/vhosts/funnetwork/hosting/meinetestseite1/lo/register.php on line 10


mfg
  Quote  

01.05.2009 to 20:12  #6408
Mitch
Co-Admin

Avatar

Registered: 10.11.2006
Contributions: 1379

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
Da Du sonst keine Informationen gegeben hast, kann ich nur raten: Da hast versucht eine Datenreihe von einem MySQL-Ergebnis zu holen, welches keins ist. Wahrscheinlich gab mysql_query() wegen einer fehlerhaften SQL-Query false zurück.
_____________________
Matpo.de Co-Admin | Just for fun Coder
Offline  Quote  

01.05.2009 to 20:16  #6409
Gast
Gast

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
was an weitere imfos der php code

Code:

<?php
include "includes/config.php";
include "includes/config_db.php";
include "includes/header.php";
$datei_url = "register";
include "includes/lang/index.php";

$sql = "SELECT * FROM online";
$result = mysql_query($sql);
while ($row = mysql_fetch_object($result)){
$Spalten_Text = $row->registrierung;
if( $Spalten_Text == 'offline') {
echo $row->r_off_text;
}else{
?>
<?php


$do = $_GET['do'];
$username = $_POST["username"];

if ($do == "pruefen"){
if ($username){
$data = mysql_query("SELECT * FROM `users` WHERE `name` = '$username'");
$data_num = mysql_num_rows($data);
if ($data_num != 0) {
?>
<?php
echo "<font color='red'>$lang_vor_username</font></br>";
$error = 1;
}
}else{
echo "<font color='red'>$lang_fehl_username</font><br>";
$error = 1;
}
if ($error){
$ok = "cross.png";
}else{
$ok = "accept.png";
}
}else{
$error = 1;
}


if (isset($_REQUEST['save'])) {
$passwort = $_POST["passwort"];
$passwort2 = $_POST["passwort2"];
$email = $_POST["email"];
$newsletter = $_POST["newsletter"];
$username = $_GET['un'];
if($newsletter == 1)
{
$newsletter = 'Ja';
}
else
{
$newsletter = "Nein";
}



if($_POST['agb'] == 1){
if($passwort != $passwort2)
{
echo "$lang_fehl_pw_w<br>";
exit;
}
if(!preg_match( '/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/' , $email)){
echo "$lang_fehl_mail<br>";
exit;
}
if($username == "" OR $passwort == "")
{
echo "$lang_fehl_felder<br>";
exit;
}
$passwort = md5($passwort);

$result = mysql_query("SELECT id FROM users WHERE name LIKE '$username'") OR die(mysql_error());
$menge = mysql_num_rows($result);

if($menge == 0)
{
$datum = date("d.m.y - H:i");
$eintrag = "INSERT INTO users (name,pass,email,admin,newsletter,lastconnect) VALUES ('$username', '$passwort','$email','Nein','$newsletter','$datum')";
$eintragen = mysql_query($eintrag) OR die(mysql_error());
?>

<?php
if($eintragen == true)
{
echo "$lang_beg";
exit;
}
else
{
echo "$lang_error<br>";
}
}
else
{
echo "$lang_vor_username<br>";
}
}
else
{
echo "$lang_fehl_regel<br>";
}
}
?>
<script language="javascript">
function oeffnefenster (url) {
fenster=window.open(url, "_blank", "width=600,height=400,status=yes,scrollbars=yes,resizable=yes");
fenster.focus();
return false;
}
</script>
<form action="?do=pruefen" method="post">
<b><?php echo "$lang_gewu_name"; ?></b><br>
<input type="text" size="24" maxlength="30" name="username" value="<?php echo "$username"; ?>">
<?php if ($ok){ ?>
<img style="width: 16px; height: 16px;" src="img/<?php echo "$ok"; ?>">
<?php } ?>
<p><br>
<input type="image" src="img/puefen.png" alt="Pruefen" title="<?php echo "$lang_pru_username"; ?> " border="0">
<br>
<?php
if ($error == ""){
?>
</form>
<form action="?un=<?php echo"$username"; ?>" method="post">
<input type="hidden" name="do" value="register" />
<input type="hidden" name="save" value="1" />
<b><?php echo "$lang_gewu_pass"; ?></b><br>
<input type="password" size="24" maxlength="50" name="passwort"><br>
<?php echo "$lang_wieder_pass"; ?><br>
<input type="password" size="24" maxlength="50" name="passwort2"></p>
<p><br>
<b><?php echo "$lang_email"; ?></b><br>
<input type="text" size="24" maxlength="50" name="email"></p>
<p>&nbsp;</p>
<p><?php echo "$lang_newsletter_ep"; ?>
<input type="checkbox" name="newsletter" value="1" checked></p>
<p><br>
<?php echo "$lang_ich_habe"; ?> <a href="regel.php" target="_blank" onclick="oeffnefenster(this.href); return false"><?php echo "$lang_regeln"; ?></a> <?php echo "$lang_gelesen_stimme_zu"; ?><input type="checkbox" name="agb" value="1"></p>
<p>&nbsp;</p>
<p>&nbsp;<input type="submit" value="<?php echo "$lang_reg"; ?>"> </p>
</form>
<?php
}
}
}

include "includes/footer.php";
?>
 


wenn hir noch was braucht schreibt es
  Quote  

01.05.2009 to 20:23  #6410
Mitch
Co-Admin

Avatar

Registered: 10.11.2006
Contributions: 1379

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
Füge mal nach der Zeile:
Code:
<?php
$result = mysql_query($sql); 

Das ein:
Code:
<?php
if ( !$result ) die('MySQL-Fehler:' . mysql_error()); 

Wenn mysql_query kein Ergebnis liefert, wird die Fehlermeldung von MySQL anzeigt.

Lies dir umbedingt mal diesen Beitrag durch, um in deinem Code einige Sicherheitslücken zu stopfen: PHP und XSS
_____________________
Matpo.de Co-Admin | Just for fun Coder
Offline  Quote  

01.05.2009 to 20:31  #6411
Gast
Gast

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
ok mach ich mal
  Quote  

01.05.2009 to 20:37  #6412
Gast
Gast

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
ich habe nun denn code rein gemacht und nun kommt das

Code:
MySQL-Fehler:Table 'meinetestseite1.online' doesn't exist 
  Quote  

01.05.2009 to 20:41  #6413
Mitch
Co-Admin

Avatar

Registered: 10.11.2006
Contributions: 1379

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
Kannst kein Englisch? ^^

Ich übersetz' mal:
"Tabelle 'meinetestseite1.online' existiert nicht"
_____________________
Matpo.de Co-Admin | Just for fun Coder
Offline  Quote  

02.05.2009 to 20:35  #6414
Gast
Gast

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
hallo ich noch mal
was heißt das vo muss die tabelle hin und wie
  Quote  

02.05.2009 to 20:53  #6415
Gast
Gast

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
hilfe bitte was muss in die tabelle online
  Quote  

03.05.2009 to 11:26  #6416
Mitch
Co-Admin

Avatar

Registered: 10.11.2006
Contributions: 1379

Title: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in / on line 10
Mir scheint, du hast nicht viel Ahnung von dem Code, den Du da vor dir hast. Ich rate dir, dir zuerst einfach die Grundlagen von PHP und (My)SQL anzueignen, bevor Du daran weiter machst.
_____________________
Matpo.de Co-Admin | Just for fun Coder
Offline  Quote  

Reply
Username:
Title:
  Fett Unterstrichen Kursiv Strike Marquee Code Links Center Rechts Liste Code Zitat Code PHP Code Code Bild Link eMail Farbe
Nachricht:

HTML is not allowed
Smilies are allowed
BBCode is allowed
Confirmation Code: Confirmation Code ==>
 

MatPo Facebookseite MatPo Twitterseite MatPo Googleplus Seite Add News Feeds zu Google