Op deze website gebruiken we cookies om content en advertenties te personaliseren, om functies voor social media te bieden en om ons websiteverkeer te analyseren. Ook delen we informatie over uw gebruik van onze site met onze partners voor social media, adverteren en analyse. Deze partners kunnen deze gegevens combineren met andere informatie die u aan ze heeft verstrekt of die ze hebben verzameld op basis van uw gebruik van hun services. Meer informatie.

Akkoord

Vraag & Antwoord

Webprogrammeren & scripting

[php] scriptfout Help needed aub

None
5 antwoorden
  • wat is er fout met dit?

    <?
    require "dblogon.php";

    require "options.php";

    require "header.php";

    if ($signupallowed=="no";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Closed </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Sorry but sign up is closed right now</table><br>";
    require "footer.php"; die; }

    if ($submit) {

    if ($first_name=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>First Name <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }

    if ($sec_name=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Second Name <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }

    if ($gender=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Gender <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }


    if ($age=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Age <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }

    if ($country=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Country of origin <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }

    if ($username=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Username <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }

    if ($planetname=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>Planetname <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }


    if ($email=="";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<tr>";
    echo "<br>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Error </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=2 color=red>E-Mail <font color=steelblue>not specified!<br>
    Hit the back button on your browser and please fill it in.<br></table><br>";
    require "footer.php"; die; }

    $result = mysql_query("SELECT * FROM ".$BOS["table"]."
    WHERE username='$username'",$db);
    if ($myrow = mysql_fetch_array($result)) { echo "User with username '$username' already registered!"; require "footer.php"; die; }

    $result = mysql_query("SELECT * FROM ".$BOS["table"]."
    WHERE planetname='$planetname'",$db);
    if ($myrow = mysql_fetch_array($result)) { echo "User with planetname '$planetname' already registered!"; require "footer.php"; die; }

    $result = mysql_query("SELECT * FROM ".$BOS["table"]."
    WHERE email='$email'",$db);
    if ($myrow = mysql_fetch_array($result)) { echo "User with e-mail '$email' already registered!"; require "footer.php"; die; }


    $garbage = substr(md5(time()),0,10);

    $sql ="INSERT INTO".$BOS["table"]."(first_name,sec_name,gender,age,country,username,planetname,email,password,ui_moons,energy,liquide_metal,protection)
    VALUES('$first_name','$sec_name','$gender','$age','$country,$username','$planetname','$email','$garbage','2','1000','1000','85')";

    $result = mysql_query($sql);

    if ($result && $mode=="internet";) {
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<br><br>";
    echo "<tr>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Account created! </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=1>";
    echo "Your password is sent by e-mail.<br>n";
    echo "</table><br>";

    mail($email,$BOS["name"]." - Account",$BOS["name"]." account:nnUsername: $UsernamenPassword: $garbagennYou can edit the password under 'Preferences' after you log in.nnPlease promote this game to al of your friendsnn-".$BOS["name"]." crew/","From: AcIDeR@home.nl";);

    }

    if ($result && $mode=="lan";){
    echo "<table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>";
    echo "<br><br>";
    echo "<tr>";
    echo "<td bgcolor=#001930 width=230><font face=verdana size=1> Account created! </td>";
    echo "</td>";
    echo "</tr>";
    echo "<td bgcolor=#11314F width=400 colspan=2><font face=verdana size=1>";
    echo "<table><td><font <font face=verdana size=1 color=gold>Your Username is:</td><td><font face=verdana size=1 color=steelblue>$username</td><tr>n";
    echo "<table><td><font <font face=verdana size=1 color=gold>Your Password is:</td><td><font face=verdana size=1 color=steelblue>$garbage</td><tr>n";
    echo "</table><br><center><a href=game/login.php>Click here to go to the login page.</a>";}

    }
    else {
    ?>
    <table cellpadding=0 cellspacing=0 border=1 bordercolor=#001930 align=center>
    <br>
    <tr>
    <td bgcolor=#001930 width=230><font face=verdana size=1> Sign Up: </td>
    </td>
    </tr>
    <td bgcolor=#11314F width=500 colspan=2><font face=verdana size=1><table>
    <form method="post" action="<?php echo $PHP_SELF?>">
    <td><font face="Arial" size="1"><b>Your personal info:</b><br><br><tr>
    <td><font face="Arial" size="1"><b>First Name:</td><td><input type="Text" name="first_name" size="12" maxLength="12"><tr>
    <td><font face="Arial" size="1"><b>Second Name:</td><td><input type="Text" name="sec_name" size="20" maxLength="20"><tr>
    <td><font face="Arial" size="1"><b>Gender:</td><td>
    <SELECT name=gender>
    <OPTION value="" selected>Please Select</OPTION>
    <OPTION value=female>Female</OPTION>
    <OPTION value=male>Male</OPTION>
    </SELECT><tr>
    <td><font face="Arial" size="1"><b>Age:</td><td>
    <SELECT name=age>
    <OPTION value="" selected>Please Select</OPTION>
    <OPTION value=<15>< 15</OPTION>
    <OPTION value=16-18>16-18</OPTION>
    <OPTION value=19-21>19-21</OPTION>
    <OPTION value=22-39>22-39</OPTION>
    <OPTION value=30+>Older then 30</OPTION>
    </SELECT><tr>
    <td><font face="Arial" size="1"><b>Country:</td><td>
    <SELECT name=country> <OPTION value="" selected>Please Select<OPTION
    value=AF>Afghanistan<OPTION value=AL>Albania<OPTION
    value=DZ>Algeria<OPTION value=AS>American Samoa<OPTION
    value=AD>Andorra<OPTION value=AO>Angola<OPTION
    value=AI>Anguilla<OPTION value=AQ>Antarctica<OPTION
    value=AG>Antigua and Barbuda<OPTION value=AR>Argentina<OPTION
    value=AM>Armenia<OPTION value=AW>Aruba<OPTION
    value=AU>Australia<OPTION value=AT>Austria<OPTION
    value=AZ>Azerbaijan<OPTION value=BS>Bahamas<OPTION
    value=BH>Bahrain<OPTION value=BD>Bangladesh<OPTION
    value=BB>Barbados<OPTION value=BY>Belarus<OPTION
    value=BE>Belgium<OPTION value=BZ>Belize<OPTION
    value=BJ>Benin<OPTION value=BM>Bermuda<OPTION
    value=BT>Bhutan<OPTION value=BO>Bolivia<OPTION value=BA>Bosnia and
    Herzegovina<OPTION value=BW>Botswana<OPTION value=BV>Bouvet
    Island<OPTION value=BR>Brazil<OPTION value=IO>British Indian Ocean
    Territory<OPTION value=VG>British Virgin Islands<OPTION
    value=BN>Brunei<OPTION value=BG>Bulgaria<OPTION value=BF>Burkina
    Faso<OPTION value=BI>Burundi<OPTION value=KH>Cambodia<OPTION
    value=CM>Cameroon<OPTION value=CA>Canada<OPTION value=CV>Cape
    Verde<OPTION value=KY>Cayman Islands<OPTION value=CF>Central
    African Republic<OPTION value=TD>Chad<OPTION value=CL>Chile<OPTION
    value=CN>China<OPTION value=CX>Christmas Island<OPTION
    value=CC>Cocos Islands<OPTION value=CO>Colombia<OPTION
    value=KM>Comoros<OPTION value=CD>Congo, Democratic Peoples
    Republic<OPTION value=CG>Congo, Republic of<OPTION value=CK>Cook
    Islands<OPTION value=CR>Costa Rica<OPTION value=HR>Croatia<OPTION
    value=CU>Cuba<OPTION value=CY>Cyprus<OPTION value=CZ>Czech
    Republic<OPTION value=DK>Denmark<OPTION value=DJ>Djibouti<OPTION
    value=DM>Dominica<OPTION value=DO>Dominican Republic<OPTION
    value=TP>East Timor<OPTION value=EC>Ecuador<OPTION
    value=EG>Egypt<OPTION value=SV>El Salvador<OPTION
    value=GQ>Equatorial Guinea<OPTION value=ER>Eritrea<OPTION
    value=EE>Estonia<OPTION value=ET>Ethiopia<OPTION value=FK>Falkland
    Islands<OPTION value=FO>Faroe Islands<OPTION value=FJ>Fiji<OPTION
    value=FI>Finland<OPTION value=FR>France<OPTION value=GF>French
    Guiana<OPTION value=PF>French Polynesia<OPTION value=TF>French
    Southern Territories<OPTION value=GA>Gabon<OPTION
    value=GM>Gambia<OPTION value=GE>Georgia<OPTION
    value=DE>Germany<OPTION value=GH>Ghana<OPTION
    value=GI>Gibraltar<OPTION value=GR>Greece<OPTION
    value=GL>Greenland<OPTION value=GD>Grenada<OPTION
    value=GP>Guadeloupe<OPTION value=GU>Guam<OPTION
    value=GT>Guatemala<OPTION value=GN>Guinea<OPTION
    value=GW>Guinea-Bissau<OPTION value=GY>Guyana<OPTION
    value=HT>Haiti<OPTION value=HM>Heard and McDonald Islands<OPTION
    value=HN>Honduras<OPTION value=HK>Hong Kong<OPTION
    value=HU>Hungary<OPTION value=IS>Iceland<OPTION
    value=IN>India<OPTION value=ID>Indonesia<OPTION
    value=IR>Iran<OPTION value=IQ>Iraq<OPTION value=IR>Ireland<OPTION
    value=IL>Israel<OPTION value=IT>Italy<OPTION value=IC>Ivory
    Coast<OPTION value=JM>Jamaica<OPTION value=JP>Japan<OPTION
    value=JO>Jordan<OPTION value=KZ>Kazakhstan<OPTION
    value=KE>Kenya<OPTION value=KI>Kiribati<OPTION value=KP>Korea,
    North<OPTION value=KR>Korea, South<OPTION value=KW>Kuwait<OPTION
    value=KG>Kyrgyzstan<OPTION value=LA>Laos<OPTION
    value=LV>Latvia<OPTION value=LB>Lebanon<OPTION
    value=LS>Lesotho<OPTION value=LR>Liberia<OPTION
    value=LY>Libya<OPTION value=LI>Liechtenstein<OPTION
    value=LT>Lithuania<OPTION value=LU>Luxembourg<OPTION
    value=MO>Macau<OPTION value=MK>Macedonia, Former Yugoslav Republic
    of<OPTION value=MG>Madagascar<OPTION value=MW>Malawi<OPTION
    value=MY>Malaysia<OPTION value=MV>Maldives<OPTION
    value=ML>Mali<OPTION value=MT>Malta<OPTION value=MH>Marshall
    Islands<OPTION value=MQ>Martinique<OPTION
    value=MR>Mauritania<OPTION value=MU>Mauritius<OPTION
    value=YT>Mayotte<OPTION value=MX>Mexico<OPTION
    value=FM>Micronesia<OPTION value=MD>Moldova<OPTION
    value=MC>Monaco<OPTION value=MN>Mongolia<OPTION
    value=MS>Montserrat<OPTION value=MA>Morocco<OPTION
    value=MZ>Mozambique<OPTION value=MM>Myanmar<OPTION
    value=NA>Namibia<OPTION value=NR>Nauru<OPTION
    value=NP>Nepal<OPTION value=NL>Netherlands<OPTION
    value=AN>Netherlands Antilles<OPTION value=NC>New Caledonia<OPTION
    value=NZ>New Zealand<OPTION value=NI>Nicaragua<OPTION
    value=NE>Niger<OPTION value=NG>Nigeria<OPTION value=NU>Niue<OPTION
    value=NF>Norfolk Island<OPTION value=MP>Northern Mariana
    Islands<OPTION value=NO>Norway<OPTION value=OM>Oman<OPTION
    value=XX>Other<OPTION value=PK>Pakistan<OPTION
    value=PW>Palau<OPTION value=PA>Panama<OPTION value=PG>Papua New
    Guinea<OPTION value=PY>Paraguay<OPTION value=PE>Peru<OPTION
    value=PH>Philippines<OPTION value=PN>Pitcairn Island<OPTION
    value=PL>Poland<OPTION value=PT>Portugal<OPTION value=PR>Puerto
    Rico<OPTION value=QA>Qatar<OPTION value=RE>Reunion<OPTION
    value=RO>Romania<OPTION value=RU>Russia<OPTION
    value=RW>Rwanda<OPTION value=GS>S. Georgia and S. Sandwich
    Islands<OPTION value=KN>Saint Kitts & Nevis<OPTION
    value=LC>Saint Lucia<OPTION value=VC>Saint Vincent and The
    Grenadines<OPTION value=WS>Samoa<OPTION value=SM>San Marino<OPTION
    value=ST>Sao Tome and Principe<OPTION value=SA>Saudi Arabia<OPTION
    value=SN>Senegal<OPTION value=SC>Seychelles<OPTION value=SL>Sierra
    Leone<OPTION value=SG>Singapore<OPTION value=SK>Slovakia<OPTION
    value=SI>Slovenia<OPTION value=SO>Somalia<OPTION value=ZA>South
    Africa<OPTION value=ES>Spain<OPTION value=LK>Sri Lanka<OPTION
    value=SH>St. Helena<OPTION value=PM>St. Pierre and Miquelon<OPTION
    value=SD>Sudan<OPTION value=SR>Suriname<OPTION value=SJ>Svalbard
    & Jan Mayen Islands<OPTION value=SZ>Swaziland<OPTION
    value=SE>Sweden<OPTION value=CH>Switzerland<OPTION
    value=SY>Syria<OPTION value=TW>Taiwan<OPTION
    value=TJ>Tajikistan<OPTION value=TZ>Tanzania<OPTION
    value=TH>Thailand<OPTION value=TG>Togo<OPTION
    value=TK>Tokelau<OPTION value=TO>Tonga<OPTION value=TT>Trinidad
    and Tobago<OPTION value=TN>Tunisia<OPTION value=TR>Turkey<OPTION
    value=TM>Turkmenistan<OPTION value=TC>Turks and Caicos
    Islands<OPTION value=TV>Tuvalu<OPTION value=UM>U.S. Minor Outlying
    Islands<OPTION value=UG>Uganda<OPTION value=UA>Ukraine<OPTION
    value=AE>United Arab Emirates<OPTION value=GB>United
    Kingdom<OPTION value=US>United States<OPTION
    value=UY>Uruguay<OPTION value=UZ>Uzbekistan<OPTION
    value=VU>Vanuatu<OPTION value=VA>Vatican City<OPTION
    value=VZ>Venezuela<OPTION value=VN>Viet Nam<OPTION value=VI>Virgin
    Islands<OPTION value=WF>Wallis and Futuna Islands<OPTION
    value=EH>Western Sahara<OPTION value=YE>Yemen<OPTION
    value=YU>Yugoslavia (Former)<OPTION value=ZR>Zaire<OPTION
    value=ZM>Zambia<OPTION value=ZW>Zimbabwe</OPTION></SELECT><tr>

    <td><font face="Arial" size="1"><b><br>Game settings:</b><br><br><tr>
    <td><font face="Arial" size="1"><b>Username:</td><td><input type="Text" name="username" size="12" maxLength="12"><tr>
    <td><font face="Arial" size="1"><b>Planet Name:</td><td><input type="Text" name="planetname" size="20" maxLength="20"><tr>
    <td><font face="Arial" size="1"><b>E-Mail adres:</td><td><input type="Text" name="email" size="25" maxLength="25"><tr>

    <td><font face="Arial" size="1"><b><br>Additional info:</b><br><br><tr>
    <td><font face="Arial" size="1"><b><center><input type="checkbox" name="newsletter" value="yes" checked></td><td><font face="Arial" size="1">:I would like to receive the BoS newsletter.</td><tr>

    <td><font face="Arial" size="1"><b><br>Rulles of Agreement</b><br><br><tr>
    <td><font face="Arial" size="1"><b><center><input type="checkbox" name="agreement" value="yes" ></td><td><font face="Arial" size="1">:I agree with the Rulles of BoS.</td><tr>

    <td></td><td><input type="Submit" name="submit" value="Sign me up"><tr>
    </form>
    </table></table><br>
    <?
    }

    require "footer.php";

    ?>

    hij geeft niet te gewenste output (totaal niks)en hij zet niks in de DB

    [ Dit Bericht is bewerkt door: teacher op 2002-03-20 22:45 ]
  • Wat krijg je voor melding dan? Ik denk niet dat men op zo'n gigantisch stuk code zit te wachten zonder verdere uitleg.
  • Ik denk dat niemand de moeite gaat nemen om jouw hele script door te nemen!Post anders een stukje waar jij denk waar de fout zit! En post volgende keer zo'n lang script tussen [code:1:28a4f23aff] en [/code:1:28a4f23aff] ! Dat behoud het overzicht! Maar daar moet Bill zich maar mee bemoeien,ik ben slecht junior :grin:

    [edit]
    SurfDude was me net voor!
    [/edit]
    _________________
    RC5 ook in Drenthe http://www.superkoe.com

    [ Dit Bericht is bewerkt door: marien op 2002-03-20 19:56 ]
  • heb het al gefixed

    nu geeft hij het volgende

    Warning: Bad Message destination in c:phpdevwwwsign up.php on line 141

    regel

    141:

    mail($email,$BOS["name"]." - Account",$BOS["name"]." account:nnUsername: $UsernamenPassword: $garbagennYou can edit the password under 'Preferences' after you log in.nnPlease promote this game to al of your friendsnn-".$BOS["name"]." crew/","From: AcIDeR@home.nl";);

    (kan het eraan liggen dat ik geen smtp adres heb ingesteld?)
  • Je moet inderdaad een mailserver hebben draaien (zoek bij tucows/download.com of zo) om mail te kunnen versturen.

Beantwoord deze vraag

Dit is een gearchiveerde pagina. Antwoorden is niet meer mogelijk.