duncan_cowan
Members-
Posts
109 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by duncan_cowan
-
hi i recently started using the script "prototype window" from http://prototype-window.xilinus.com/ the window is working fine but when i try to include the javascript commands, such as minimize or close, in the script it comes up with an error " 'win' is undefined " the place where i run the command is a register form which is accessed from the login form and both are in prototype windows here is the code: <html><head><script type="text/javascript" src="http://www.worldwarsix.com/protected/prototype_win/javascript/prototype.js"> </script><script type="text/javascript" src="http://www.worldwarsix.com/protected/prototype_win/javascript/window.js"> </script><link href="http://www.worldwarsix.com/protected/prototype_win/themes/ww6.css" rel="stylesheet" type="text/css"/></head><script>win.setSize(400,500);</script><body bgcolor=#000000>... the code is expected to make the window bigger but this doesnt happen.please could someone help?thanks in advance.
-
no have tried these but the frame still displays within the pagethe prototype window is here
-
i have done this and now it displays the page in a box at the top of my page but it is embedded into the page not like a popup
-
hi i have used "prototype window" to have a popup window in my site but i do not know why it is not working:(main popup script in middle) <html><head><script type="text/javascript" src="/protected/prototype_win/javascripts/prototype.js"> </script><script type="text/javascript" src="/protected/prototype_win/javascripts/window.js"> </script> <link href="/protected/prototype_win/stylesheets/themes/default.css" rel="stylesheet" type="text/css"/></head> <tr> <td colspan="3" height="85" background="protected/images/WW6_16.gif" <--Main Popup Section-->onclick="window.location.href='var win = new Window({className: 'spread', title: 'Ruby on Rails',top:70, left:100, width:300, height:200,url: 'http://www.rubyonrails.org/', showEffectOptions: {duration:1.5}}); java script:win.show()'" style="cursor: pointer"><--end popup section--><div align="center"><p>Click Here To Enter Protected Area </div></td> </body></html> it does contain more script obviously but i think these are the only important parts.please could someone help?thanks
-
is there a way i could split the page up into three different tables :one at the top,the main part, and the side part,so then when one table gets bigger the other will stay the same?
-
hi on my website there is a template with a side bar and a main sectionwhen the main section is longer than the side bar the side bar is pulled down and the background images of the side bar are seperated this is a problemthe website address is www.worldwarsix.comand the problem is after you login username: test password: testthe side bar edge lines are separatedis there anyway to stop this from happing if you can see the problem?thanks duncan.
-
do not worry i have solved it was the other part of the script that was the problem.
-
hi i am using the "while" function to echo the contents of the rows in a mysql table. unfortunatley only one row is being echoed.here is the script: $result_armies = mysql_query("SELECT * FROM armiesWHERE username = '".$username."'");while($row = mysql_fetch_array($result_armies)) { echo " <table border='0' background='images/logged-in/box.gif' align='center'> <tr> <td colspan='2'> <img src='images/logged-in/blank-short.gif' width='280'></td> </tr> <tr> <td><font size='2' face='font1' color='#FFFFFF'> Name:</font></td> <td><font size='2' face='font1' color='#FFFFFF'>".$row['army_name']."</font></td> </tr> <tr> <td><font size='2' face='font1' color='#FFFFFF'> Rank:</font></td> <td><font size='2' face='font1' color='#FFFFFF'>".$row['army_rank']."</font></td> </tr> <tr> <td><font size='2' face='font1' color='#FFFFFF'> Strength:</font></td> <td><font size='2' face='font1' color='#FFFFFF'>".$row['strength']."</font></td> </tr> <tr> <td colspan='2'><img src='images/logged-in/boxend.gif' alt='' width='280'></td> </tr> </table> "; } what is wrongthanks
-
dont worry i have found out what was causing it the included file (logout.php) also included the file with this script in so it was going around in circles.
-
its something to do with "if($last_active<$time) {"
-
hi i am getting a strange error in some script.when i run it it comes up with a "500 internal server error" but when i delete "$time = time();" from it it shows the page.here is the script: <?php/* check login script, included in db_connect.php. */$time = time();$last_active = $_SESSION['last_active'];session_start();if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { $logged_in = 0; return;} else { if($last_active<$time) { $timeout = 1; require "logout.php"; } // remember, $_SESSION['password'] will be encrypted. if(!get_magic_quotes_gpc()) { $_SESSION['username'] = addslashes($_SESSION['username']); } // addslashes to session username before using in a query. $pass = $db_object->query("SELECT password FROM users WHERE username = '".$_SESSION['username']."'"); if(DB::isError($pass) || $pass->numRows() != 1) { $logged_in = 0; unset($_SESSION['username']); unset($_SESSION['password']); // kill incorrect session variables. } $db_pass = $pass->fetchRow(); // now we have encrypted pass from DB in //$db_pass['password'], stripslashes() just incase: $db_pass['password'] = stripslashes($db_pass['password']); $_SESSION['password'] = stripslashes($_SESSION['password']); //compare: if($_SESSION['password'] == $db_pass['password']) { // valid password for username $logged_in = 1; // they have correct info // in session variables. } else { $logged_in = 0; unset($_SESSION['username']); unset($_SESSION['password']); // kill incorrect session variables. }}// clean upunset($db_pass['password']);$_SESSION['username'] = stripslashes($_SESSION['username']);?> please could someone helpthanks.
-
there must be a problem with that script because even thougt it says that they are not set they are...
-
the cookies are not seti test them with this script: if (isset($_COOKIE["username"])){echo "set";echo $_COOKIE["username"];} else {echo "not set";}
-
hi i have made a script that is meant to process a login and it used to run with sessions but i wanted to use cookies to carry the loggin info so i set it to set some cookies but it doesnt work...please could someone help?script: $username = $_POST['uname']; $password = $_POST['passwd']; setcookie("username", "$username"); setcookie("password", "$password"); thanks in advance...
-
dont worry i tried using the mysql error function but to do this I set the query as a variable and just setting it as a variable seemed to work.Thanks to all those who suggested!
-
Hi I have made a script to insert a row into a database with the computers ip and a random number, but noting will be added to the database. Please could someone help...script: <?php$ip = $_SERVER["REMOTE_ADDR"];$random = rand(600000000, 900000000); // between * and * inclusive$user_number = $ip.$random;if (isset($_COOKIE["user_online"])){echo $_COOKIE["user_online"];$sql_script = 'SELECT COUNT (*) FROM users_online';$users_online = mysql_query($sql_script);} else {setcookie("user_online", "$user_number");echo "Cookie set";mysql_query("INSERT INTO users_online (rand-num) VALUES ('".$user_number."')");$sql_script = mysql_query("SELECT * FROM users_online");$num_rows = mysql_num_rows($sql_script);echo $num_rows;}?> Thankyou in advance...
-
HiI have written a script to count users using a cookie stored on the users computer containing a random number and then storing the number in a database. then the script counts the number of rows but when i run it, it displays an error.script: <?php$random = rand(60000000000000000000000, 90000000000000000000000); // between 0 and 100 inclusiveif (isset($_COOKIE["user_online"])){$sql_script = 'SELECT * FROM users-online';$count_sql = mysql_query($sql_script);$users_online = mysql_num_rows($count_sql);} else {setcookie("user_online", "$random");mysql_query("INSERT INTO users-online VALUES ('".$random."', '".$_SERVER['REMOTE_ADDR']."')");}?> and the error: Please could someone help??thanks in advance.Duncan
-
hi how do you add to a value in a mysql database with php?i have tried using this code but nothing happens: UPDATE users SET gold + '".$total_gold."' WHERE username = '".$user_details[0]."' AND password = '".$user_details[1]."' please could someone help?? thanks.
-
Hi please could someone tell me what is wrong with this code: <?phpinclude("db_connect.php");$query = mysql_query("SELECT * FROM armies WHERE username=".$_SESSION['username']."");while($row = mysql_fetch_array($query)) { }?> When i run it it says:"Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/i04wasp/public_html/protected/armyhome.php on line 10"Thankyou...
-
i have taken your advice and just used 1 table for this the member logon is now working!!!
-
when i run this script it always says "ERROR IN INSERT!!" what is wrong with it please?:: <?phprequire("protected/db_connect.php");$result = mysql_query("SELECT * FROM unactivated_users WHERE act_num = '".$_GET['act_num']."'");$row = mysql_fetch_array($result);$_POST['password'] = md5($_POST['password']);if ($row['password']==$_POST['password']) {mysql_query("INSERT INTO users SELECT username, password, regdate, email, location, show_email, last_login, rank, army_species, game_rank, FROM unactivated_users WHERE act_num = '".$row['act_num']."'")or die("ERROR IN INSERT!!");mysql_query("DELETE FROM unactivated_users WHERE act_num = '".$row['act_num']."'")or die("ERROR IN DELETE");} else {die("ERROR!!");}header('Location: http://www.wasper-rocker.co.uk/activate.php?act=1')?>