הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 02-03-10, 01:50   # 9
dor77
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jan 2008
הודעות: 1,650

dor77 לא מחובר  

לא..
עכשיו יש שלשושה הודעות כאלה:

Warning: Cannot modify header information - headers already sent by (output started at c:\wamp\www\a\sign_in.php:1) in c:\wamp\www\a\sign_in.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at c:\wamp\www\a\sign_in.php:1) in c:\wamp\www\a\sign_in.php on line 18

Warning: Cannot modify header information - headers already sent by (output started at c:\wamp\www\a\sign_in.php:1) in c:\wamp\www\a\sign_in.php on line 19

זה הקוד..למקרה שטעיתי..:


PHP קוד:
<?php
ob_start
();
mysql_connect("localhost""root""");
mysql_select_db("phpmyadmin"); 
$user_name mysql_real_escape_string(htmlspecialchars($_POST['user_name']));
$password mysql_real_escape_string(htmlspecialchars(md5($_POST['password'])));
$query mysql_query("SELECT * FROM users WHERE user_name='$user_name'"); 
$row=mysql_fetch_array($query);
$row_password=$row['password'];
$row_user_name=$row['user_name'];
$password_cookie=$row['password'];
$user_name_cookie=$row['user_name'];
if (isset(
$_POST['submit']))
{
if (
$row_password==$password && $row_user_name==$user_name)
{
    
setcookie("username"$user_nametime()+60000);
    
setcookie("id"$id_cookietime()+60000);
        
header("location: index.php");
}
  else
{
        echo 
'
    
        <div id="top_menu">
        <span class="menu_class">
        <a href="sign_in.php">Login</a>&nbsp;&nbsp;
        <a href="sign_up.php">Register</a>
        </span>
        </div>
        
        <h1>Login to your account...</h1> 
        
          <div id="register_message"><p class="failed">Login Fail!</p>
        <span class="failed">Please check your deatiles and try again.</span></div> 
        
        <div id="form">
        <form action="" method="POST">
        <table id="registertable" cellpadding="10" border="0">
        <tr>
            <td align="left">
                <span class="field">Username:</span>
            </td>
            <td align="left">
                    <input type="text" name="user_name" id="user_name" dir="ltr" value="" style="width:200px;" maxlength="50">
            </td>
        </tr>
        <tr>
            <td align="left">
                <span class="field">Password:</span>
            </td>
            <td align="left">
                <input type="Password" name="password" id="password" dir="ltr"  value="" style="width:200px;" maxlength="15">
            </td>      
        <tr>
            <td align="right"></td>
            <td align="center">
                <label>&nbsp; </label><input type="submit" name="submit" value="" id="submit" />
            </td> 
        </tr>
        </table>
        </form>
        </div>
    
        <div id="copyrights">
        © All rights reserved.
        </div>
}
        '
;
}

}
else
{
        echo 
'
    
        <div id="top_menu">
        <span class="menu_class">
        <a href="sign_in.php">Login</a>&nbsp;&nbsp;
        <a href="sign_up.php">Register</a>
        </span>
        </div>
        
        <h1>Login to your account...</h1> 
        
        <div id="form">
        <form action="" method="POST">
        <table id="registertable" cellpadding="10" border="0">
        <tr>
            <td align="left">
                <span class="field">Username:</span>
            </td>
            <td align="left">
                    <input type="text" name="user_name" id="user_name" dir="ltr" value="" style="width:200px;" maxlength="50">
            </td>
        </tr>
        <tr>
            <td align="left">
                <span class="field">Password:</span>
            </td>
            <td align="left">
                <input type="Password" name="password" id="password" dir="ltr"  value="" style="width:200px;" maxlength="15">
            </td>      
        <tr>
            <td align="right"></td>
            <td align="center">
                <label>&nbsp; </label><input type="submit" name="submit" value="" id="submit" />
            </td> 
        </tr>
        </table>
        </form>
        </div>
    
        <div id="copyrights">
        © All rights reserved.
        </div>
        '
;
}


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Your Private Homepage</title>
    <meta  http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
body {
    background-image:url('background.png');
    background-repeat: repeat-x;
}

#top_menu {
    text-align: right;
    position:relative;
    right:30px;
    top:0px;
}
.menu_class a:link {
    color:gray; 
    font-size:10pt;  
    font-family:Arial; 
     text-decoration: underline;
}
.menu_class a:visited {
         color:gray; 
         font-size:10pt; 
         font-weight:normal;  
         font-family:Arial; 
         text-decoration: underline;
}
a.links {
        display: block;
        padding-top: 24px;
        height: 46px;
        width: 200px;
        color: #484848;
        font-family: Arial, sans-serif;
        font-size:18px;
        font-weight: bold;
        text-decoration: none;
}
a.links:hover {
        display: block;
        padding-top: 24px;
        height: 46px;
        width: 200px;
        color: gray;
        font-family: Arial, sans-serif;
        font-size:18px;
        font-weight: bold;
        text-decoration: none;
}
h1 {
        color:#3366CC; 
        font-size:25pt; 
        font-weight:bold;  
        font-family:Arial; 
        text-align: left;
        margin-top: 60px;
        margin-right: 0px;
        margin-bottom: 0px;
        margin-left: 100px;
        border: 0px solid #000000;
}
#form {
     position:relative;
     left:87px;
     top:40px;
        width:500px;
}
span.field {
        text-align:left;
        direction:ltr;
        color:#505050; 
        font-size:12pt;
        font-weight:bold;  
        font-family:Arial;
}
p.failed {
        text-align:left;
        direction:ltr;
        color:red; 
        font-size:15pt;
        font-weight:bold;  
        font-family:Arial;
}
span.succed {
    text-align:left;
 direction:ltr;
 color:green; 
 font-size:12pt;
 font-weight:normal;  
 font-family:Arial;
}
p.succed {
 text-align:left;
 direction:ltr;
 color:green; 
 font-size:15pt;
 font-weight:bold;  
 font-family:Arial;
}
span.errors {
        text-align:left;
        direction:ltr;
        color:red; 
        font-size:10pt;
        font-weight:normal;  
        font-family:Arial;
}
span.failed {
        text-align:left;
        direction:ltr;
        color:red; 
        font-size:10pt;
        font-weight:bold;  
        font-family:Arial;
}
#register_message {
        position:relative;
        left:100px;
        top:17px;
        width:450px;
        border: 0px solid #000000;
}
table#registertable  { 
        border: 0px solid #000000;
        border-right: 0px solid #000000;
}
#copyrights {
    clear:both;
    padding:80px 0px 15px;
    text-align:center;
    color:gray; 
    font-size:10pt;  
    font-family:Arial; 
}
.button {
        border: 1px solid #505050;
        background: #f5f5f5;
        cursor:pointer;
        width: 100px;
        padding-left:5px;
        padding-right:5px;
        padding-bottom:5px;
        padding-top:5px;
        text-align: center;
        text-align:center;
        color:#505050; 
        font-size:12pt;
        font-weight:bold;  
        font-family:Arial;
}
label {
        display: block;
        width: 180px;
        float: left;
        margin: 2px 4px 6px 4px;
        text-align: left;
}
#submit {
        color: #fff;
        font-size: 0;
        width: 68px;
        height: 28px;
        border: none;
        background: #ffffff url(signin_btn.bmp) 0 0 no-repeat;
        cursor:pointer;
}
}
</style>
</head>
</html>
תודה (:
__________________
מתכנת php אמין ומקצועי.
מחירים נוחים!
יצירת קשר: 0544378743
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 02:52.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ