[fout] in het script

Gestart doorPropje1 reacties38 weergaven

2 berichten · pagina 1 van 1

Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo ik heb een fout in een script

Fatal error: Call to undefined function login() in /home/pascal/domains/test-up.v3host.nl/public_html/martijn/login.php on line 46

lijn 46:

[COLOR= #0000BB]<?php[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]login[COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]){[/COLOR]
                ?>


en heb nog een fout de session werkt niet.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/pascal/domains/test-up.v3host.nl/public_html/martijn/login.php:1) in /home/pascal/domains/test-up.v3host.nl/public_html/martijn/config.php on line 2

lijn 2 : config.php

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"localhost"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"pascal_up"[/COLOR][COLOR= #007700],[/COLOR]


En de hele script is:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700];[/COLOR]
?>
<!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=utf-8" />
    <title>SMI </title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
    <script src="jquery.corner.js" type="text/javascript"></script>
    <link rel="stylesheet" href="style.css" type="text/css" />
    <script type="text/javascript">
        $(#quote).corner("10px");
    </script>
    <link rel="stylesheet" href="css_drop/style.css" type="text/css" media="screen, projection"/>
    <!--[if lte IE 7]>
        <link rel="stylesheet" type="text/css" href="css/ie.css" media="screen" />
    <![endif]-->
            
    <script type="text/javascript" language="javascript" src="js/jquery.dropdownPlain.js"></script>
</head>
<body>
<div id=container>
    <div id=header>
    <div id=menu>
        <ul class=dropdown>
            <li><a href=>Home</a></li>
            <li><a href=>Onze Diensten</a></li>
            <li><a href=>Adverteren</a></li>
            <li><a href=>Adverteren</a></li>
            <li><a href=>Portfolio</a>
                <ul>
                <li><a href=>Webdesign</a></li>
                <li><a href=>Scripting</a></li>
                <li><a href=>basing</a></li>
                <li><a href=>SEO / SEA</a></li>
                </ul>
            </li>
            <li><a href=>Contact</a></li>
        </ul>
    </div>
    <div id=quote>
    MVK Media heeft mij altijd netjes geholpen met mijn website een zeer goede en vriendelijke zakenpartner<br />
    <span>Hans v.d. struik - test.nl</span>
    </div>
    </div>
       [COLOR= #0000BB]<?php[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]login[COLOR= #007700]() ==[/COLOR] [COLOR= #DD0000]1[/COLOR][COLOR= #007700]){[/COLOR]
                ?>
    <div id=content>
                
        <a href= class=a_big><div class=big>
            <img src=images/icon.png alt= />
            <center><span>mijn gegevens</span></center>
        </div></a>
        <a href= class=a_big><div class=big>
            <img src=images/icon.png alt= />
            <center><span>mijn opdrachten</span></center>
        </div></a>
        <a href= class=a_big><div class=big>
            <img src=images/icon.png alt= />
            <center><span>mijn facturen</span></center>
        </div></a>
        <a href= class=a_big><div class=big>
            <img src=images/icon.png alt= />
            <center><span>opdracht plaatsen</span></center>
        </div></a>
        <a href= class=a_big><div class=big>
            <img src=images/icon.png alt= />
            <center><span>tarieven</span></center>
        </div></a>
        <a href= class=a_big><div class=big>
            <img src=images/icon.png alt= />
            <center><span>mijn domeinen</span></center>

        </div></a>
                [COLOR= #0000BB]<?php[/COLOR]
                     [COLOR= #007700]}[/COLOR]
                 ?>
        <br class=clear />
        <div id=portfolio>
            <span>ons portfolio<br />
            <img src=images/portfolio.png alt= style=margin: 0 5px;display: block;/>
        </div>
        <div id=left>
            <h4>Welkom op de website van MVK Media</h4>
                <span class=size>
                    <a href= class=size1>A</a>
                    <a href= class=size2>A</a>
                    <a href= class=size3>A</a>
                </span>
            <img src=images/line.png alt= />

            [COLOR= #0000BB]<?php[/COLOR]

    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]))
    {[/COLOR]
         [COLOR= #FF8000]//Alle inputs beveiligen.[/COLOR]
        [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);[/COLOR]

        
        [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]

        
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700]))
        {[/COLOR]
            [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Je hebt geen gebruikersnaam ingevuld.<br>"[/COLOR][COLOR= #007700];
        }[/COLOR]
 
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]))
        {[/COLOR]
            [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Je hebt geen wachtwoord ingevuld.<br>"[/COLOR][COLOR= #007700];
        }[/COLOR]

         
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])
        {[/COLOR]
            
            
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$error[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
                 
            [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `users` WHERE `user`="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$user[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" AND `pass`="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]" AND `emailactief`=yes"[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$res[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]

             
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
            {[/COLOR]
                
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je gebruikersnaam of wachtwoord zijn niet juist, of je account is nog niet geactiveerd!"[/COLOR][COLOR= #007700];
                
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL]
            [COLOR= #007700]{[/COLOR]
                
                [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$user[/COLOR][COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ip[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]];[/COLOR]
                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Location: /leden/index.php"[/COLOR][COLOR= #007700]);
            }
        }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]

?>
<form action="" method="post" enctype="multipart/form-data" /> 
Gebruikersnaam:<br />
<input name="user" type="text" /><br /><br />
Wachtwoord:<br />
<input name="pass" type="password" /><br /><br />
<input type="submit" name="submit" value="Inloggen" /></td>
</form>
[COLOR= #0000BB]<?php[/COLOR] 
    [COLOR= #007700]}[/COLOR]
?>

        </div>
        <div id=right>
            <h5>onze diensten</h5>
            <img src=images/line_klein.png alt= />
            <ul id=diensten>
                <li>Slicen (Xhtml / CSS omzetting)</li>
                <li>Slicen (Xhtml / CSS omzetting)</li>
                <li>Slicen (Xhtml / CSS omzetting)</li>
                <li>Slicen (Xhtml / CSS omzetting)</li>
                <li>Slicen (Xhtml / CSS omzetting)</li>
            </ul>
            <img src=images/line_klein.png alt= />
        </div>
    </div>
</div>
<br class=clear />
<div id=footer>
<div id=footer_inside>
    <p>
        <table>
            <tr id=titels>
                <td width=150px>Onze Diensten</td>
                <td width=300px></td>
                <td width=200px>Contact</td>
            </tr>
            <tr><td>Slicen</td><td>Linkbuilding</td><td>Martijn van Kujck</td></tr>
            <tr><td>Slicen</td><td>Linkbuilding</td><td>Martijn van Kujck</td></tr>
            <tr><td>Slicen</td><td>Linkbuilding</td><td>Martijn van Kujck</td></tr>
            <tr><td>Slicen</td><td>Linkbuilding</td><td>Martijn van Kujck</td></tr>
            <tr><td>Slicen</td><td>Linkbuilding</td><td>Martijn van Kujck</td></tr>
            <tr><td>Slicen</td><td>Linkbuilding</td><td>Martijn van Kujck</td></tr>
        </table>
        <div id=bel>
        <b style=font-size: 14px;color: black;>Bel mij terug</b>
        [COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR] [COLOR= #007700]&& ![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700]))
  {[/COLOR]
    [COLOR= #0000BB]$aFouten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
      {[/COLOR]
        [COLOR= #0000BB]$aFouten[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Je hebt geen naam ingevuld[/COLOR][COLOR= #007700];
      }[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]telnummer[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
      {[/COLOR]
        [COLOR= #0000BB]$aFouten[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]Je hebt geen telefoonnummer ingevuld[/COLOR][COLOR= #007700];
      }[/COLOR]
    
      
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFouten[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
          {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]er zijn wat fouten gevonden <br /><br />[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$Fi[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$Fi[/COLOR] [COLOR= #007700]<[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aFouten[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$Fi[/COLOR][COLOR= #007700]++)
              {[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$aFouten[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$Fi[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];
              }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br />Klik <a href="javascript:history.go(-1);">hier</a> om terug te keren[/COLOR][COLOR= #007700];
          }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
          [COLOR= #007700]{[/COLOR]
           [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO belme(naam,telnummer) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]telnummer[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]  
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Bedankt we bellen je zo snel mogelijk op."[/COLOR][COLOR= #007700];
          }
      
  }[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
  [COLOR= #007700]{[/COLOR]
?>
            <form action="" method="POST">
                        <input type="text" value="Naam" name="naam" maxlength="12" />
                        <input type="text" value="Telefoonnummer" name="telnummer">
            <input type=image id=submit src="images/submit.png" HEIGHT="18" WIDTH="78" BORDER="0" /><br /><br />
                </form>
[COLOR= #0000BB]<?php[/COLOR]
  [COLOR= #007700]}[/COLOR]
?> 
        </div>
    </p>
</div>
</div>
</body>
</html>
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
login(); bestaat niet, en dit lijkt meer op 3 scripts die in elkaar gegooid zijn.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren