President Obama
Members-
Posts
55 -
Joined
-
Last visited
Never
Everything posted by President Obama
-
Nah I didn't use it, that it was interesting to see it.
-
Oh ok I think I understand them a bit better now. Thanks!
-
Wait so, in a switch all the cases are ran?
-
God dam it, what good are switches for then? I thought thats what they were for. Bloody oath there confusing.
-
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"; }
-
Best Method to add Rounded Corners to a Div
President Obama replied to FishSword's topic in CSS Help
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. -
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?
-
What makes $user_id?
-
Oh I see your declaring the variable in the link. I see now. I'll give this a crack.
-
Adding a redirect to your .htaccess file? Probably away to do it with php, I'm just to nooby.
-
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.
-
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?
-
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>
-
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?
-
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.
-
I learnt a lot about php/mysql from tizag.com and from the php manual. Never used an ebook.
-
ok Thanks guys. I'm always learning new things. This random stuff is a bit tricky to me.
-
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; }
-
Secure Login System Help Please
President Obama replied to President Obama's topic in PHP Coding Help
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.