
Demonic
Members-
Posts
562 -
Joined
-
Last visited
Never
Contact Methods
-
Website URL
http://fpsreviews.com
Profile Information
-
Gender
Male
Demonic's Achievements

Advanced Member (4/5)
0
Reputation
-
Just a note: echo "var randomAnimals=new Array(\"" . implode('"',$myarray) . "\");"; Would output what your expecting.
-
Yes its possible, just echo the data out like normal.
-
Why dont you do it threw MySQL way easier then you can just do: $search = $_POST['search']; $submit = $_POST['submit']; if(isset($submit)){ $results = mysql_query("SELECT * FROM data WHERE data_info LIKE '%$search%' ") or die(mysql_error()); while($show_results = mysql_fetch_array($results)){ echo $show_results[info];
-
Im just wondering because im working on a delay login system and I was wondering whats better to use : Sleep() or Set_time_limit()
-
Ok, But you aint have to be so mean about it. Could of just said I think he means that your coding is incorrect. and posted code. -_-
-
[quote=me] <?php ob_start(); mysql_connect("localhost","root","*******") or die(mysql_error()); mysql_select_db("************") or die(mysql_error()); $cookieid = htmlspecialchars($_COOKIE[uid]); $cookiepass = htmlspecialchars($_COOKIE[upass]); $logged = mysql_query("SELECT * FROM users WHERE id='$cookieid' AND password='$cookiepass' "); $logged = mysql_fetch_array($logged); ?> [/quote] Thats where cookie is coming from^config.php file so other then what you said abuot the ob_start(); im fine?
-
because I simply stated: [quote]config.php includes cookie would this possible work out[/quote] meaning $logged is a cookie and it does say session_start(); Oh and about the $logged not being quoted its a whilestatement in my config.php [code] <?php ob_start(); mysql_connect("localhost","root","*******") or die(mysql_error()); mysql_select_db("************") or die(mysql_error()); $cookieid = htmlspecialchars($_COOKIE[uid]); $cookiepass = htmlspecialchars($_COOKIE[upass]); $logged = mysql_query("SELECT * FROM users WHERE id='$cookieid' AND password='$cookiepass' "); $logged = mysql_fetch_array($logged); ?> [/code]
-
[code] <?php ob_start(); include "config.php"; session_start(); if($logged[level] == 5){ $_SESSION['auth'] = true; }else{ $_SESSION['auth'] = false; } if($_SESSION['auth'] == true){ //show some stuff }elseif($_SESSION['auth'] == false){ include "login.php"; } ?> [/code] config.php includes cookie would this possible work out What im trying to manage is to check if a user is an administrator then use a session to tell the page that he is allowed to view the page else he can not view the page and it shows login page. Can someone tell me if this is correct.
-
Kinda Wierd but yah i need to center somthen that wont center :(
Demonic replied to Demonic's topic in PHP Coding Help
nevermind host is down but i think i got problem solved: margin-left: auto; margin-right: auto; -
wow wildteen and thorpe is back :) *waves* thanks ill fix it now :)
-
alright im using nl2br() to make new lines and i got a textarea to view your current signature is thier a way for the <BR>'s to be hidden in edit script script but the <br> still work? ' like hidden <BR>'s in textarea's
-
whoohoo :) works man you saved my life :) ah can you tell me why it has to be "&"? thanks for all your help XD
-
Ok you know how pagination works with the _GET[] well i have a viewforum script that is confusion this how it is my script gets topics in that forum by getting it the the forum ID(fid) and i got a pagination problem because it gets the page by pageid(pid). but when i try and go to a new page (link looks like this now viewforums.php?fid=1?pid=1) it shows nothen when i click the next link on the pagination script is shows no topics that it should and the php script is saying get topics where forum id = the id well main problem is i can view other topics on other pages with this script: [quote] [code=php:0] Script Edited Out. [/code] [/quote]
-
i know topicname isnt the name of my topic table it was an example and it worked like i hoped it did.