Jump to content

President Obama

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Everything posted by President Obama

  1. Nah I didn't use it, that it was interesting to see it.
  2. Oh ok I think I understand them a bit better now. Thanks!
  3. God dam it, what good are switches for then? I thought thats what they were for. Bloody oath there confusing.
  4. I couldn't understand switch statements in .net and I still don't get them with php. Can someone turn this into a switch statement, I just can't wrap my head around then. if (isset($_POST['news'])){ add($_POST['text']); header("location: admin.php"); } elseif (isset($_POST['rnews'])){ deletenews($_POST['number']); header("location: admin.php"); } elseif (isset($_POST['taddm'])){ taddmember($_POST['website'], $_POST['name']); header("location: admin.php"); } elseif (isset($_POST['tdelm'])){ tdeletemember($_POST['number']); header("location: admin.php"); } elseif (isset($_POST['addm'])){ addmember($_POST['website'], $_POST['name']); header("location: admin.php"); } elseif (isset($_POST['delm'])){ deletemember($_POST['number']); header("location: admin.php"); } elseif (isset($_POST['tnews'])){ tadd($_POST['text']); header("location: admin.php"); } elseif (isset($_POST['trnews'])){ tdelete($_POST['number']); header("location: admin.php"); } elseif (isset($_POST['video'])){ videoupdate($_POST['link']); header("location: admin.php"); } else { echo " Failed"; }
  5. The way I do it is well: Image you have a box. Thats your container, then inside that box you have 9 separate boxes each individual divs. You fill your middle box with a colour, then place the corners in the corner boxes. Now what you do for the side is get a 1 pixel width bit and repeat it with the background-repeat along the axis you want. Bit hard to explain, could easily do it with pictures.
  6. Atm I have 1 big style sheet for 6 different pages. Its fairly massive because each page has a fair difference in it, I'm just wondering if its better to use multiple style sheets as in 1 generic style sheet which would control layout no more 1 style sheet for each page which controls all the different elements. Multiple style sheets would require more work, would it be worth it?
  7. Oh I see your declaring the variable in the link. I see now. I'll give this a crack.
  8. Adding a redirect to your .htaccess file? Probably away to do it with php, I'm just to nooby.
  9. I dont have an error with my code, I'm just talking about a username/password error, like atm if the username/password is wrong it goes back to the login page. I want it to go back but say Username/Password error. There really isn't any code for me to post.
  10. Say I have my login form which then when person tries to log in with the wrong user name and password and sent straight back to the log in page, how do I send back they got the password and/or username wrong. I read somewhere in some code header("location: index.php&$errorvariable"); or something like that. I haven't tested it, not even sure how to get it to work on the index, would I just use an isset on a get/post to check if it exists then echo the error?
  11. Dun worry it magically fixed itself when I uploaded it to the server again.
  12. I don't understand. All my other PHP pages work fine, its only the index thats stuffing up. Though I do agree with you thats it the php. I just rebuilt the page bit by bit and the php just won't work at all. I'm really mind blown as to whats going on.
  13. In wamp the code shows including the php which is weird, when on a server spews this error: Parse error: syntax error, unexpected $end in /homepages/11/d274847833/htdocs/clans/trichome/index.php on line 66 I'm truly lost on it. Any help is appreciated help. <!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>Home</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <?php include_once("analyticstracking.php") ?> <div id="left_graffiti"><img src="images/left_graffiti.png" /></div> <div id="right_graffiti"><img src="images/right_graffiti.png" /></div> <div id="container"> <div id="menu"> <ul> <li id="m01"><a href="http://www.trichome.ee-clans.com/"><img src="images/home-icon.png"/>Home</a></li> <li id="m02"><a href="http://www.trichome.ee-clans.com/members.php"><img src="images/user_group.png"/>Members</a></li> <li id="m03"><a href="http://www.trichome.ee-clans.com/shoutbox.php"><img src="images/megaphone.png"/>Shoutbox</a></li> <li id="m06"><a href="http://www.trichome.ee-clans.com/lounge.php"><img src="images/lounge.png" />Lounge</a></li> <li id="m04"><a href="http://www.trichome.ee-clans.com/tricruits.php"><img src="images/ticon.png" height="48" width="48"/>Tricruits</a></li> <li id="m05"><a href="http://www.trichome.ee-clans.com/aboutus.php"><img src="images/Info.png" height="40" width="40" />About us</a></li> </ul> </div> <div class="clear"></div> <div id="content"> <div id="logo"> <img src="images/logo.gif" /> </div> <div id="saying"> <h3>We love to Blaze and BooM!</h3> </div> <div id="welcome"> <h2>Welcome to Euphoria</h2> <p>Global worldwide blazers have gathered on the battlefields of Empire Earth in order to celebrate this great game.</p> <p>Countries may be divided with borders, politic's and War but we are United here for the purpose of Worldwide dominance in the inhaling of the finest Trichomes, and saving Empire Earth. </p> </div> <img src="images/globe.gif" /> <div id="news"> <h2>News & Annoucements</h2> <?php //connect section, you don't need to see that . $result = mysql_query("SELECT * FROM main ORDER BY id desc") or die(mysql_error()); $count=0; $cond=0; while($row = mysql_fetch_array($result)){ echo "<p><strong>" . $row['date'] . "</p></strong>"; echo "<p>" . $row['name'] . "</p>"; if($cond==0){ echo "<div class=\"break\"></div>"; $cond++; } else { echo "<div class=\"break2\"></div>"; $cond--; } } ?> </div> <img src="images/dragon.gif" /> <div id="video"> <h2>Video</h2> <?php $result2 = mysql_query("SELECT * FROM video ORDER BY id desc"); echo $result2; ?> </div> </div> <div class="clear"></div> <div id="footer"> <p>Copyright © Trichome Clan all rights reserved.</p> </div> </div> </body> </html>
  14. mysql_query("UPDATE login SET GUID = $string WHERE Username = 'indica'")or die(mysql_error()); Gets this result: Unknown column 'UnWHkJD38OhkfBLVz5y1b75N4oY88rWQ' in 'field list' I really can't figure out whats wrong. Its like its turning GUID into the string I don't understand why.
  15. So could I say, put a hidden value on each form, then have the action go to another page which then checks that value and assigns the appropriate function to that form?
  16. Is it possible to link action in the form to a function thats included from a functions file? Like so: <form action="<?php add($text); ?>" > <input type="text" name="text" /> <input type="submit" /> </form> What I want to do is add a block of text to the database. The add function does that. So ideas? I have like 9 of these forms on the same page they all do different things though but all involve modify the database.
  17. I learnt a lot about php/mysql from tizag.com and from the php manual. Never used an ebook.
  18. Dam I thought DW might of had a specific function to find the variable because I could of used that variable name in my body. Oh Well.
  19. ok Thanks guys. I'm always learning new things. This random stuff is a bit tricky to me.
  20. Had a crack at making my own generator which makes some jumble 32 characters long with letters and numbers. In logic it seemed fine to me. It practice it just does nothing. function generate(){ $abc = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"); $num = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"); $result = ""; for ($i = 0; $i < 32; $i++){ $bool = rand(0,1); if ($bool = 1) { $result . $abc[rand(0,25)]; } else { $result . $num[rand(0,9)]; } } echo $result; }
  21. Say I've made a variable called $Hi and I've used it in 4 different documents because it ends up in a session and/or cookie but now I want to change that variable name to $bye and all the instances of it in the 4 documents. Is that possible in dreamweaver?
  22. Sorry for double post but seeming I can't edit my other post... This code was working fine before I added the GUID but now I can't get it to work at all. Its as if the session/cookies wont start/set. I've tried removing the GUID part and parts that I didn't think were important to no avail. I really don't know what the problem is.
×
×
  • 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.