Şimdi Ara

php mysql yardım

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
15
Cevap
1
Favori
424
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • Bu Sitemde Yazan Hata...


    Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/rozik92657j/public_html/index.php on line 34


    Buda İndex.php Sayfam...



    <?php require_once('connections/xrozi.php');
    mysql_select_db($database_xrozi,$xrozi);
    mysql_query("SET NAMES UTF8");
    $qur="select * from dil";
    $res=mysql_query($qur,$xrozi);
    ?>
    <style type="text/css">
    body {
    background-image: url(css/img/products/spot-light-1.png);
    margin-left: -100px;
    }
    #ana tr #flag {
    }
    </style>
    <style type="text/css">body, a:hover {cursor: url(css/curcors.cur), progress !important;}</style>
    <table width="500" align="center" id="ana">
    <tr>
    <td width="1049" height="250" align="center" valign="top"><p> </p>
    <p> </p>
    <p> </p>
    <p><img src="css/img/logo.png" width="350" height="100" /></p></td>
    </tr>
    <tr>
    <td align="center" valign="middle" id="flag"> <?php while($row=mysql_fetch_array($res)) { ?>

    echo $row['id']?>" data-href="home.php?dilid=">
    <?php } ?> </td>
    </tr>
    <tr>
    <td height="154" align="center" valign="bottom"><img src="css/bannerlogo.png" alt="" width="191" height="126" /></td>
    </tr>
    <tr>
    <td height="114" align="center" valign="bottom"><img src="css/created-by-spektra7.png" width="150" height="35" /></td>
    </tr>
    </table>







  • quote:

    Orijinalden alıntı: xxxkolcuxxx

    Bu Sitemde Yazan Hata...


    Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/rozik92657j/public_html/index.php on line 34


    Buda İndex.php Sayfam...



    <?php require_once('connections/xrozi.php');
    mysql_select_db($database_xrozi,$xrozi);
    mysql_query("SET NAMES UTF8");
    $qur="select * from dil";
    $res=mysql_query($qur,$xrozi);
    ?>
    <style type="text/css">
    body {
    background-image: url(css/img/products/spot-light-1.png);
    margin-left: -100px;
    }
    #ana tr #flag {
    }
    </style>
    <style type="text/css">body, a:hover {cursor: url(css/curcors.cur), progress !important;}</style>
    <table width="500" align="center" id="ana">
    <tr>
    <td width="1049" height="250" align="center" valign="top"><p> </p>
    <p> </p>
    <p> </p>
    <p><img src="css/img/logo.png" width="350" height="100" /></p></td>
    </tr>
    <tr>
    <td align="center" valign="middle" id="flag"> <?php while($row=mysql_fetch_array($res)) { ?>

    <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=117565622&url=home.php?dilid=<?php echo $row['id']?>" data-href="home.php?dilid=<?php echo $row['id']?>"><img src="css/img/lang/langg/<?php echo $row['bayrak'] ?>.png" width="100" height="100" /></a>
    <?php } ?> </td>
    </tr>
    <tr>
    <td height="154" align="center" valign="bottom"><img src="css/bannerlogo.png" alt="" width="191" height="126" /></td>
    </tr>
    <tr>
    <td height="114" align="center" valign="bottom"><img src="css/created-by-spektra7.png" width="150" height="35" /></td>
    </tr>
    </table>


    $res=mysql_query($qur,$xrozi);

    satırının altına aşağıdaki ifadeyi eklersen, MYSQL'den dönen hatayı da görebiliriz.

    if (!$res) {
    exit(mysql_error());
    }




  • bütün mysql'leri mysqli olarak değiştirmeyi dene bakalım
  • Hocam O sorunun nedeni benzer isimli mysql veri tabanı sorunuydu ve kendiliğinden çözüldü.Yinede Teşekkürler Ama Başka sorunum ortaya çıktı şöyle anlayatım;


    "rozikids.com/panel/"

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/rozik92657j/public_html/panel/index.php:1) in /home/rozik92657j/public_html/panel/index.php on line 37

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/rozik92657j/public_html/panel/index.php:1) in /home/rozik92657j/public_html/panel/index.php on line 37




    "index.php"


    <?php require_once('../Connections/xrozi.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
    session_start();
    }

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    }

    if (isset($_POST['textfield'])) {
    $loginUsername=$_POST['textfield'];
    $password=$_POST['textfield2'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "login-home.php";
    $MM_redirectLoginFailed = "index.php";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_xrozi, $xrozi);

    $LoginRS__query=sprintf("SELECT username, pass FROM users WHERE username=%s AND pass=%s",
    GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));

    $LoginRS = mysql_query($LoginRS__query, $xrozi) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = "";

    if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;

    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    }
    header("Location: " . $MM_redirectLoginSuccess );
    }
    else {
    header("Location: ". $MM_redirectLoginFailed );
    }
    }
    ?>
    <style type="text/css">
    #ana tr td form #ic-back {
    background-image: url(css/images/login-back.png);
    background-repeat: no-repeat;
    }
    #ana tr td form #ic-back tr td #login {
    font-family: "Arial Black", Gadget, sans-serif;
    text-decoration: none;
    color: #000;
    }
    body {
    margin-top: 50px;
    }
    </style>

    <table width="1024" align="center" id="ana">
    <tr>
    <td height="500"> <form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
    <table width="364" align="center" id="ic-back">
    <tr>
    <td width="356" height="438"><table width="291" align="center" id="login">
    <tr>
    <td width="111">Kullanıcı Adı:</td>
    <td width="140"><label for="textfield"></label>
    <input type="text" name="textfield" id="textfield"></td>
    </tr>
    <tr>
    <td>Parola:</td>
    <td><input type="text" name="textfield2" id="textfield2"></td>
    </tr>
    <tr>
    <td> </td>
    <td align="center" valign="middle"><input type="submit" name="button" id="button" value="Gönder"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </form></td>
    </tr>
    </table>





    acaba sorun nedir hocam???




  • Yardım Edecek Yok mu Acill İhtiyacım Var Forum Donanım Haber Lütfenn
  • xxxkolcuxxx X kullanıcısına yanıt
    PHP bir şekilde output verdiyse ve/veya header gönderdiyse ondan sonra session başlatamazsın.

    session_start();'ı kodun en üstüne alırsan sorun çözülür.
  • denedim hocam ama işe yaramadı...

    site adresiwww.rozikids.com/panel@funky-nd@fehmix



    < Bu mesaj bu kişi tarafından değiştirildi xxxkolcuxxx -- 11 Haziran 2016; 10:13:44 >
  • Yapay Zeka’dan İlgili Konular
    mysql hatası, yardım!
    4 yıl önce açıldı
    Php veri programlama
    5 yıl önce açıldı
    php nuke kurulumu
    20 yıl önce açıldı
    Daha Fazla Göster
  • xxxkolcuxxx X kullanıcısına yanıt
    session_start() en üstteyse,

    onun altına

    ob_start();

    sayfanın en altına da

    <?php ob_end_flush(); ?> koyarak dener misin?
  • Denedim Hocam Hala Değişen Bir şey Yok...
  • kodun son halini paylaşabilir misin?
  • <?php
    session_start();
    ob_start();
    require_once('../Connections/xrozi.php');
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }
    ?>
    <?php

    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {

    }

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    }

    if (isset($_POST['textfield'])) {
    $loginUsername=$_POST['textfield'];
    $password=$_POST['textfield2'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "login-home.php";
    $MM_redirectLoginFailed = "index.php";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_xrozi, $xrozi);

    $LoginRS__query=sprintf("SELECT username, pass FROM users WHERE username=%s AND pass=%s",
    GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));

    $LoginRS = mysql_query($LoginRS__query, $xrozi) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = "";

    if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;

    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    }
    header("Location: " . $MM_redirectLoginSuccess );
    }
    else {
    header("Location: ". $MM_redirectLoginFailed );
    }
    }
    ?>
    <style type="text/css">
    #ana tr td form #ic-back {
    background-image: url(css/images/login-back.png);
    background-repeat: no-repeat;
    }
    #ana tr td form #ic-back tr td #login {
    font-family: "Arial Black", Gadget, sans-serif;
    text-decoration: none;
    color: #000;
    }
    body {
    margin-top: 50px;
    }
    </style>

    <table width="1024" align="center" id="ana">
    <tr>
    <td height="500"> <form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
    <table width="364" align="center" id="ic-back">
    <tr>
    <td width="356" height="438"><table width="291" align="center" id="login">
    <tr>
    <td width="111">Kullanıcı Adı:</td>
    <td width="140"><label for="textfield"></label>
    <input type="text" name="textfield" id="textfield"></td>
    </tr>
    <tr>
    <td>Parola:</td>
    <td><input type="text" name="textfield2" id="textfield2"></td>
    </tr>
    <tr>
    <td> </td>
    <td align="center" valign="middle"><input type="submit" name="button" id="button" value="Gönder"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </form></td>
    </tr>
    </table>
    <?php ob_end_flush(); ?>




  • xxxkolcuxxx X kullanıcısına yanıt
    Bu kodu kendi lokal'imde sorunsuz çalıştırıyorum. Hiç hata vermiyor. Ne tür bir hata alıyorsun?
  • Hocam Bende Local de Sorunsuz Ayarladım Ama Siteye Attığımda Problem Oldu...

    Acaba Bana Buna benzer basit bir panel kodu verebilir misiniz???



    < Bu mesaj bu kişi tarafından değiştirildi xxxkolcuxxx -- 11 Haziran 2016; 15:48:12 >
  • xxxkolcuxxx X kullanıcısına yanıt
    Eğer local'de sorunsuz çalışıyorsa, siteye attığında problem oluyorsa include ettiğin

    require_once('../Connections/xrozi.php');

    xrozi.php dosyasında hata olabilir. Sitede veritabanına sorunsuz bağlanabiliyor musun?
  • Evet Çünkü anasayfayıda aynı veriden alıyorum...
  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.