Jump to content

Niixie

Members
  • Posts

    108
  • Joined

  • Last visited

    Never

Everything posted by Niixie

  1. Alright, i would be pleased if someone else answered
  2. I donno why it doesnt print any error, it just doesnt do anything... Does anyone know why?
  3. No, there are no warnings or errors at all. Thats whats weird :S
  4. Hey, i've made this code thats supposed to email me. -It worked for some time ago, then i edited it and cant get it working again. <?php session_start(); //Gram slik udregning $gram_blandet = $_SESSION["blandet"]*40; $gram_ananas = $_SESSION["ananas"]*40; $gram_banan = $_SESSION["banan"]*50; $gram_jumbo = $_SESSION["jumbo"]*50; $gram_cashew = $_SESSION["cashew"]*30; $gram_pistacie = $_SESSION["pistacie"]*30; $gram_mandler = $_SESSION["mandler"]*30; $ialt = $gram_blandet+$gram_ananas+$gram_banan+$gram_jumbo+$gram_cashew+$gram_pistacie+$gram_mandler; //Kommentar ting if($_SESSION["kommentarer"] == "Skriv dem her") $comment = "Ingen"; else if(strlen($_SESSION["kommentarer"]) == 0) $comment = "Ingen"; else $comment = $_SESSION["kommentarer"]; //Email information $txt_message = ' <html> <body> <h2>Ordre på Kloneslik</h2> <p>'.$_SESSION["navn"].' har bestilt klone slik.</p><br /> <table border="0"> <tr> <td><h2>Forsendelses information</h2></td> </tr> <tr> <td width="350">Navn: </td> <td>'.$_SESSION["navn"].'</td> </tr> <tr> <td width="350">Addresse: </td> <td>'.$_SESSION["addresse"].'</td> </tr> <tr> <td width="350">Postnummer: </td> <td>'.$_SESSION["postnummer"].'</td> </tr> <tr> <td width="350">Telefon: </td> <td>'.$_SESSION["telefon"].'</td> </tr> <tr> <td><h2>Slik</h2></td> </tr> <tr> <td width="350">Blandet Mix 40g: </td> <td>'.$_SESSION["blandet"].'</td> </tr> <tr> <td width="350">Ananas 40g Tørrede: </td> <td>'.$_SESSION["ananas"].'</td> </tr> <tr> <td width="350">Banan 50g Tørrede: </td> <td>'.$_SESSION["banan"].'</td> </tr> <tr> <td width="350">Jumbo rosiner 50g: </td> <td>'.$_SESSION["jumbo"].'</td> </tr> <tr> <td width="350">Cashewnødder 30g Ristet og Saltet: </td> <td>'.$_SESSION["cashew"].'</td> </tr> <tr> <td width="350">Pistacienødder 30g Saltet: </td> <td>'.$_SESSION["pistacie"].'</td> </tr> <tr> <td width="350">Mandler 30g Ristet og saltet: </td> <td>'.$_SESSION["mandler"].'</td> </tr> <tr> <td><hr /></td> </tr> <tr> <td width="350">Poser ialt: </td> <td>'.$_SESSION["blandet"]+$_SESSION["ananas"]+$_SESSION["banan"]+$_SESSION["jumbo"]+$_SESSION["cashew"]+$_SESSION["pistacie"]+$_SESSION["mandler"].'</td> </tr> <tr> <td width="350">Gram slik ialt: </td> <td> '.$ialt.' </td> </tr> <tr> <td><h2>Andet</h2></td> </tr> <tr> <td>Yderligere kommentarer:</td> <td> '.$comment.' </td> </tr> </table> </body></html>'; $to = "email@email.email"; $subject = "Test"; $message = $txt_message; $headers = "From: Klone slikbestilling" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($to,$subject,$message,$headers); ?> Its the first time i've tried to make a system like that, and it is in the top of the script. Can anyone tell me whats wrong with it?
  5. Niixie

    banner help!

    It totaly answered my question, and it totaly worked! Thanks for your help and time!
  6. Niixie

    banner help!

    I cannot administrate anything in here sorry -But, i got one thing you need to clear for me. Is there a way to let something in behind, like butting the background in first layer? Because i have a dropdown menu just above the pictures?
  7. Niixie

    banner help!

    Thank you very much! It worked!
  8. Niixie

    banner help!

    I did the php stuff, and did the few changes in my own document. And it does not work? is it because its gif?
  9. Niixie

    banner help!

    Thank you, and sorry. Quick question, how can i do so its impossible to scroll to the sides?
  10. Niixie

    banner help!

    No respond yet? Can anybody else help?
  11. Niixie

    banner help!

    Thank you very much for answering, but it doesnt turn out that good. Its just blank side? HTML <div id="banner"> <div id="bannerfix-left"></div> <div id="bannerfix-middel"></div> <div id="bannerfix-right"></div> </div> CSS #bannerfix-left { height:100%; /* or as high as the height of the image */ width:20%; /* anything is ok */ background: url(images/bannerfix-left.gif) repeat-x top left; /* repeating horizontal */ float: left; } #bannerfix-middel { height:100%; /* or as high as the height of the image */ width:60%; /* anything is ok */ background: url(images/bannerfix-middel.gif) repeat-x top left; /* repeating horizontal */ float: left; } #bannerfix-right { height:100%; /* or as high as the height of the image */ width:20%; /* anything is ok */ background: url(images/bannerfix-right.gif) repeat-x top left; /* repeating horizontal */ float: left; }
  12. Niixie

    banner help!

    For some reason i could not edit my last post. Nvm, i just attached my logo so you can see the white stribes that i want to go to the sides of the screen. [attachment deleted by admin]
  13. Niixie

    banner help!

    Hey peeps! I need somehelp because, my logo has a line that should go from the very start of the screen to the very end. My problem is, how? -I tryed to get a picture, and make the width. But it sets the hole picture big? Please help if you can!
  14. I solved it myself, sorry i posted. What fixed it was wrong/none doctype Hey peeps! I have this problem: -I've made 3 divs, located next to eachother (works fine, no problem). And then i want, when you hover over coloum1(2,3) it should make the background-color:white; But when i do that, it doesnt work?! Heres a snippet of my html and css so you can see it HTML <div id="coloums"> <div class="coloum1"> coloum1 </div> <div class="coloum2"> coloum2 </div> <div class="coloum3"> coloum3 </div> </div> CSS .coloum1 { background-color:#F3F3F3; float:left; margin-top: 25px; margin-left: 50px; margin-right: 25px; border: 1px black solid; height: 400px; width: 250px; } .coloum1:hover { background-color:white; } .coloum2 { background-color:#F3F3F3; float:left; margin-top: 25px; margin-left: 90px; margin-right: 60px; border: 1px black solid; height: 400px; width: 250px; } .coloum2:hover { background-color:white; } .coloum3 { background-color:#F3F3F3; float:right; margin-top: 25px; margin-left: 25px; margin-right: 50px; border: 1px black solid; height: 400px; width: 250px; } .coloum3:hover { background-color:white; } As far as i've researched, there is no problem with the hover thing, it just doesnt work for some reason? Hope you can help!
  15. Well, i could do so the link was <a href="index.php?adminedit">Admin Edit</a> It just looks better and more not messy with two question marks in it?
  16. Hey phpfreaks, i have a question that i cant get answered by google. (Yes i tried) I just wanted to know if its possible to have a link like this <a href="index.php?admin?edit">Admin Edit</a> If not, how can i be able to do it without creating another file?
  17. Then it only selects the player if his adminlevel is 1, what if i want it 1 or above? You need something a bit more dynamic. Try something like this: $result = mysql_query("SELECT adminlevel FROM accounts WHERE name = '".$_SESSION['auth_username']."'") or die(mysql_error()); $row = mysql_fetch_array($result); if($row['adminlevel'] >= 0) { echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; } else { echo 'do something'; } Wow, that worked. Thank you very much
  18. Then it only selects the player if his adminlevel is 1, what if i want it 1 or above?
  19. Didnt work. Let me tell you then, it needs to go in my database. Pick the table slot 'adminlevel' in the table 'accounts' where the name is 'ex. Niixie'. Then, if the adminlevel is equal or above 1 then let him/her see echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; else dont.
  20. The echo's echo $result; echo "Num rows: ".mysql_num_rows($result); is just for debugging, no problem there. I didnt see echo mysql_num_rows($result); //This should output the number of rows. Do you see this? before i removed it. So the echos are deleted now. And i want the if(mysql_num_rows($result) == 1) too see if the person thats logged in is => 1 admin level (I know its wrong, but i'd like it to not show in the menu in the first place.)
  21. Now i tryed some stuff, these are some of it. if(mysql_fetch_array($result, MYSQL_NUM) !== false) { echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; } // And if(mysql_fetch_array($result, MYSQL_NUM) == 1) { echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; } // and if(mysql_fetch_array($result) !== false) { echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; } // and if(mysql_fetch_array($result) == 1) { echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; } Now nothing shows?
  22. Hey PHPFreaks. I made a php code, thats only needed to be showed for admin accounts only. I tryed to echo the mysql_num_rows($result); and it gave me this: Resource id #51 Heres a piece of my code where the problem is: $result = mysql_query("SELECT adminlevel FROM accounts WHERE name = '".$_SESSION['auth_username']."'") or die(mysql_error()); echo $result; echo mysql_num_rows($result); if(mysql_num_rows($result) == 1) { echo '<br /><br /><a href="home.php?admin">Admin Area</a>'; } Hope you can help
  23. Why isn't there any detailed tutorial on how to make a login system in php? -How to store variables so they can be used in all pages etc. I'd like that...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.