Jump to content
xisto Community

TavoxPeru

Members
  • Content Count

    865
  • Joined

  • Last visited

Everything posted by TavoxPeru

  1. Thanks for the link, the webpage is very nice and amazing. I just request my invitation too .Best regards,
  2. You are welcome, i'm glad that it will help you soon, and as you, the first time i test it i get impressed with the results. This is not necesary but i suggest you to also download the weirdCorners located at the downloads page. Best regards,
  3. I agree with both of you, they are a lot of ways to achieve this and all are valid, you can use CSS with images, you can use only images without CSS, and also you can use CSS with Javascript. But one that i use to get the rounded corners effect is the one offered by the curvyCorners website, it only uses Javascript to get this effect and it is very easy to install, configure and use. BTW, you can view it in action at Te Recuerdo Peru Peruvian Wall Appointment Calendar. Best regards,
  4. I just test your code and it only works with Firefox not with Internet Explorer or Opera, also, as i supose, you are using the jquery library that is not bad and i think that it can be useful, i never use the jquery library but i know it is a very good JS library. Also, i'm thinking about copying some part of code for testing with my code. BTW, is it difficult to learn the JQuery library???? I'm start playing with another javascript library, Ext JS. Best regards,
  5. jlhaslip Yes and No, yes if you use it with another element that supports the onmouseover event like the A or P tags, and no if the element do not support it, like in this case with the SELECT. For example the following same function can be used with the A tag and with the P element like: <a href="#" onmouseover="showpic(1)">Attached to the mouseover event</a><p onmouseover="showpic(2)">Attached to the mouseover event of the P tag</p>In real world is logic that this fuction must use a variable as its value. Eggie No problem, i'm happy that it helps you. mastercomputers Because the OPTION element do not support the mouseover event, the SELECT element supports it but as a whole, if you attach the same function to the SELECT it will work but also you will need more code to get the same effect, you will need to detect the exact position of the x,y coordinates of the mouse position when it is over any of the options, etc, in other words MORE COMPLICATED. It would be very interesting to code something like that, i will appreciate it a lot if you post your solution if you do it. About the CSS hover effect, you are right, you can use it and it would work very nice even with the OPTION element but the problem is that it doesn't work with Internet Explorer. BTW, I test my code with Internet Explorer 6, Firefox 2.0.0.12 and Opera 9.24 and i can say that with Firefox all the functionality works perfectly, Opera also but the CSS hover effect only works with the INPUT element not with the OPTION, and Internet Explorer as i say above do not support the CSS hover effect in any case, well this is not absolutely true, because IE supports it with the A element, but in this example i don't use it . So the new code is this: <html><head><title>Image Pop Up On Option Change </title><script type="text/javascript"> function showpic(o) { o = parseInt(o); switch (o) { case 1: imgName='del.gif';break; case 2: imgName='doc2.gif';break; case 3: imgName='docempty.gif';break; case 4: imgName='docurl.gif';break; case 5: imgName='new.gif';break; } var DivImage = document.getElementById('DivImg'); var DisplayImg = document.getElementById('IdImg'); DisplayImg.src=imgName; DivImage.style.visibility="visible"; }</script><style type="text/css">form#form1 input {border:1px solid #414d59; padding-left:0.5em; margin-bottom:0.6em; width:230px; background:#f2f2f2;}form#form1 input:hover{ background:#b80b38; border:1px solid #fff; color:#fff;}form#form1 input:focus{background:#fff; border:1px solid #b80b38; color:#b80b38;}form#form1 option {background:#f2f2f2;}form#form1 option:hover { background:#b80b38;color:#fff;}form#form1 option:focus {background:#fff; color:#b80b38;}</style></head><body><form name="form2" method="post" action=""><table border="1"><td>Who do you wanna race?</td></table> <select size=5 name="bike" onchange="showpic(this.options[this.selectedIndex].value)" > <option value="1" >Derbi Senda 50</option> <option value="2">Honda NS 50 R</option> <option value="3" >Suzuki ZR 50</option> <option value="4">Yamaha DT 50 MX</option> <option value="5">Aprilia RS 50</option> </select>-<a href="java script:launchClasses()">?</a> <input type=submit value=Register> <div id="DivImg" style="position:relative;top:-50px;left:150px;z-index:20;width:25px;height:25px;visibility:hidden;text-align:center;"><img id="IdImg"></div><!-- code addition - here works the option onmouseover event but only with Firefox --><select size=5 name="biketwo" > <option value="1" onmouseover="showpic(1);">Derbi Senda 50</option> <option value="2" onmouseover="showpic(2);">Honda NS 50 R</option> <option value="3" onmouseover="showpic(3);">Suzuki ZR 50</option> <option value="4" onmouseover="showpic(4);">Yamaha DT 50 MX</option> <option value="5" onmouseover="showpic(5);">Aprilia RS 50</option> </select><!-- code addition --></form><a href="#" onmouseover="showpic(1)">Attached to the mouseover event of the A tag</a><br /><p onmouseover="showpic(2)">Attached to the mouseover event of the P tag</p><form id="form1"><input type="text" value="a value"><select size=5 name="bike" > <option value="1" >Derbi Senda 50</option> <option value="2">Honda NS 50 R</option> <option value="3" >Suzuki ZR 50</option> <option value="4">Yamaha DT 50 MX</option> <option value="5">Aprilia RS 50</option> <option value="6">Aprilia RS 250</option> <option value="7">Aprilia RS 150</option> </select></form></body></html>and can be viewed in action at Image Pop-up On Option Change Version 2 Best regards, EDIT 1: Code addition that demostrates that is possibly to attach a function to the onmouseover event handler of the OPTION element but only works with Firefox. EDIT 2: Check at Image Pop-up On Option Change Version 3 the last version of this code, especially the last SELECT, but as usual it only works with Firefox.
  6. Always debug your variables to verify if its values are the expected ones, you can do it simply by echoing it. Try this: <?phpsession_start();include "database.php";$givexpto= mysql_real_escape_string($_POST['givexpto']);$givexp= (int) mysql_real_escape_string($_POST['givexp']);echo $givexp;$queryxp="SELECT * FROM characters WHERE user='$givexpto'"; if(mysql_num_rows(mysql_query($queryxp))>0) { $givexpp = mysql_fetch_assoc(mysql_query($queryxp));} else { die("User Don't Excist. Please Go Back And Try Again"); }$expcomp=$givexpp['exp'] + $givexp;mysql_query("UPDATE characters SET exp=$expcomp WHERE user='$givexpto'");header("location:index.php");exit;?>Best regards,
  7. No, you don't hear wrong, i'm doing a javascript to help you, and what you don't understand??? This is the code i make that works, it is very simple and it is open to a lot of modifications: <html><head><title>Image Pop Up On Option Change </title><script type="text/javascript"> function showpic(o) { o = parseInt(o); switch (o) { case 1: imgName='del.gif';break; case 2: imgName='doc2.gif';break; case 3: imgName='docempty.gif';break; case 4: imgName='docurl.gif';break; case 5: imgName='new.gif';break; } var DivImage = document.getElementById('DivImg'); var DisplayImg = document.getElementById('IdImg'); DisplayImg.src=imgName; DivImage.style.visibility="visible"; }</script></head><body><form name="form2" method="post" action="race.php?action=race"><table border="1"><td>Who do you wanna race?</td></table> <select size=5 name="bike" onchange="showpic(this.options[this.selectedIndex].value)"> <option value="1" >Derbi Senda 50</option> <option value="2">Honda NS 50 R</option> <option value="3" >Suzuki ZR 50</option> <option value="4">Yamaha DT 50 MX</option> <option value="5">Aprilia RS 50</option> </select>-<a href="java script:launchClasses()">?</a> <input type=submit value=Register> <div id="DivImg" style="position:relative;top:-50px;left:150px;z-index:20;width:25px;height:25px;visibility:hidden;text-align:center;"><img id="IdImg"></div></td></tr></form></body></html>Take in mind that you must change all the images -names and paths- correctly to work at your website, if you want you can view it on action at Image Pop-up On Option Change. Best regards,
  8. Well, i think that it is not possible to do that with simple HTML and Javascript because you can't attach an event handler to the OPTION element, instead you can attach an event handler to the Focus, Blur and Change events of the SELECT element. Right now i'm testing a simple code to work with the Change event, so, give some time to complete it. Best regards,
  9. Another good way to start is by reading the online php tutorial called PHP: A simple tutorial and by downloading the php manual that is available at PHP: Download documentation. Also, here at the forums exists some good PHP tutorials that you can read. Best regards,
  10. You can use both extensions at the same time, i do it without problems, i never use both of them on the same script, but i use them on different scripts and never had problems. Now, if i remember correctly you must use the php_mysqli extension if you want to use the complete functionality offered by MySql 4.1.0 and greater versions, if not you can still use the php_mysql extension because is compatible with it. Best regards,
  11. Ok, thanks for your help and the information, i will try it next monday -work is over for today- and check if it work. I hope it works. Best regards,
  12. First of all i don't if it is the correct place to this post so if not please an Admin or Mod move it to the correct place, thanks.Now, the situation that i have is that i want to host an external subdomain like external-subdomain.external-domain.com on my own account hosted here at Xisto, so, if any user access this external subdomain all the files and database tables are served from here. The purpose of this external subdomain will be to host a phpBB3 forum.I also have cPanel access in this external domain so i can create the external subdomain there if necesary, but i don't know how to redirect it to access to my Xisto acount.is it valid to do this????Best regards,
  13. Don't give up, my personal opinion is that if in one way a script don't work i start again and find the solution, that's work. And try the idea you get, maybe that's the solution. Best regards,
  14. Some time ago I download -don't remember exactly from where- a very cool script named Cool Tool Tips that almost is what you need, you can view it in action at Cool Tool Tips. If it is what you need and you like it simply save it to your disk. Best regards,
  15. A few years ago i use a previous version of this software called Copernic 2001 or something like that, i remember that it was a nice freeware in that days, now it changes to an adware and i don't like this kind of software, so, because of that i don't install it. Instead of Copernic Agent what i just download from its website is another product called Copernic Desktop Search that can be a useful tool basically as a replacement of the default search tool that comes with Windows. Anyway, thanks for the share. Best regards,
  16. TavoxPeru

    Login Script

    If globals are not enabled then you must use the superglobals arrays like $_POST, $_GET, $_SERVER or $_SESSION, so it is very simple to make your script works again, simply add the superglobals to every variable that comes from your login page. For example: <?php$title = "Login"; if (!$_POST["user"] || !$_POST["pass"]) { include "head.php"; print "Please fill out all fields."; include "foot.php"; exit;}?>Here I use $_POST because it is the method that you use in your form, if you use GET then you will use $_GET instead. Now, register_globals is the directive that controls this functionality and it is Off by default and also it is recommended that you don't turn it On because it can lead to security problems. Checking at your code i see that you use sessions, in this case, you must start your sessions before any other code in your scripts, like: <?php session_start();include "config.php";include "java.php";?>Another thing here is that you don't need to use parenthesis with include, include_once, require or require_once because they are not necessary, still it is valid. Best regards,
  17. Exactly, i still use windows 2000 basically because i don't have the necesary amount of time to upgrade my OS to XP or Vista. And the OS upgrading process is not as simple as it should be . Best regards,
  18. As many people know, PHP 4 is dead, it was here for the last 7 years and officialy 2007 was the last year that the PHP development team supports it and release new versions of the PHP4 series -the last stable version is 4.4.8. They will make and release new patches for the PHP 4.4 branch until 2008-08-08, but only if are related with security issues.This is not a problem here because I know that Xisto's PHP version is 5.2.0 since the last year (i'm not pretty sure if it was installed on october 19 2007) but the last stable version of PHP is 5.2.5 and as i just read at the PHP site, the PHP development team encourages all users to upgrade to this release because it fixes over 60 bugs.So, here is my question, does Xisto plans to upgrade to this release soon??? and if it is true, i wanna know when does it will take place, basically to backup my data allocated here.BTW, if it is not the correct place of this post please an Admin or Mod move it to the correct place.Finally, good bye PHP 4, nice to meet you.Best regards,
  19. You can use the session variable directly in your code, instead of escaping your strings simply use a single quote ('), also, to prevent sql injections use the mysql_real_escape function with the data posted to your script. And personally i always attach a die() function with the mysql_error() function to every query i make to check if every thing works fine. Try the following: <?php$PoUS = mysql_real_escape_string($_POST['atkuser']);mysql_query ("UPDATE characters SET temphealth='$currentHealthYou' WHERE user='" . $_SESSION['user'] ."'") or die(mysql_error() );mysql_query ("UPDATE characters SET temphealth = '$currentHealthEnemy' WHERE user ='$PoUs'") or die(mysql_error());?> Best regards,
  20. You got that error because your query returns FALSE and the mysql_num_rows() function expects a valid result set, in this case it means that it is a new user and is valid to register, to work, try this code instead: <?php$sqlCheckForDuplicate = "SELECT username FROM user WHERE username = '". $username ."'";$result = mysql_query($sqlCheckForDuplicate) or die(mysql_error());if(mysql_num_rows($result)>0){ $feedback[] = 'You Could Not Register Because the User already exists.';}else{ $sqlRegUser = "INSERT INTO user(username, password) VALUES('$username','$password')"; if(!mysql_query($sqlRegUser)) { $feedback[] = 'You Could Not Register Because Of An Unexpected Error.'; }}?>Best regards,
  21. I guess that it stops because you use the die() function, the file_get_contents() function returns a string with the contents of the file on success and FALSE on failure, so, instead try the following: <?phperror_reporting(0); // Disable Error Reporting$online = file_get_contents("http://www.habbo.com/habbo_count_xml.action;; // Turn it back onif ($online) { $onlinee = trim(strip_tags($online)); echo $onlinee;}?>Best regards,
  22. In your second function you have a typo in document,write(Z); simply replace it with the following code: document.write(Z);But, when you executes this function you got an error and only works one time, so if your intention is to concatenate all the elements (values and texts) of the select in one string and then write it to the document -your Z variable- change your function to: function basicFiles1() { var Z = new String(""); for (i = 0; i < document.Form.regionlist.options.length; i++) { var x = document.Form.regionlist.options[i].value; var y = document.Form.regionlist.options[i].text; Z = Z + "regions" + "[" + x + "]" + " = " + y + ", "; } Z = Z.substr(0,(Z.length-2)); document.write(Z); //window.close();}Hope it helps and is what you need. Best regards,
  23. I agree with pyost, avoid cron jobs, even them are simple, they may overload the server.BTW, the code he posts not only will work with this situation, i think it would be implemented for other cases with minimum modifications.Best regards,
  24. As far as i know you use the port 3306 when you want to connect to a MySql host, not to the port that you specify, in this case 3307, also, you don't need to specify this on your connection scripts. So, change it to 3306 or delete from your code. Also, add to your code the mysql_error() function to check when you lost the connection and verify that in first case you get connected to the server: function open_connection() { $host='localhost'; $user='any'; $db='my_db'; $password='my_pass'; $conn=mysql_connect($host,$user,$password); if (!$conn) { die('Could not connect: ' . mysql_error()); } mysql_create_db ($db,$conn) or die('Could not connect: ' . mysql_error()); mysql_select_db($db); return $conn;} Another problem is that according to the PHP online manual the mysql_create_db() function is obsolete and recommends to use the mysql_query() function instead. Best regards,
  25. Thanks for sharing this freeware, and well i only say that from your list i only know fiddler and the nirsoft website that has a lot of useful freewares, the other ones i think that are really interesting and deserves a try.Best regards,
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.