TavoxPeru
Members-
Content Count
865 -
Joined
-
Last visited
Everything posted by TavoxPeru
-
I agree, use a database interface class is the best option in my opinion, and for that in all my future development i will -must- use someone, a few days ago i test the PEAR:DB class, and is very easy to use. best regards,
-
Of course it make sense, and i think that a more general way to do the database selection is by using an universal function with the database name as a parameter. best regards,
-
Excellent suggestions and congratulations for the first post, i think its very helpful for all newbies. A time ago i installed WAMP in my PC for testing and the results were great the only thing was it installs by default other software that i dont need and were very dificult to uninstall. In my case i always like to install by hand PHP, MySql and APACHE in my win 2kpro SP4 machine to have absolute control over this software with great results, when i was a newbie i had a lot of troubles :-( that cost me a lot of time but this help me at the same time a lot. BTW, the above code dont have any code to select a database to use, so, to complete it its necesary to include first a variable with the name of the database and this in both cases:$database="databasename";my_sql_select_db($database) or die("Error... no database selected, MySQL said: ".mysql_error()); Best regards,
-
Hi, i find this script and hope that will be useful for somebody. Text scrolls from bottom to top, pauses, then scrolls up and out of view. A link can be added, opening in a new window. Configuration is simple. First copy the following code in a new file and name it vertical.js /* This script and many more are available free online atThe JavaScript Source :: http://javascript.internet.comCreated by: Mike Hudson :: http://http://ww12.afrozeus.com/ *//*To change the values in the setupLinks function below.You will notice there are two arrays for each of Titles andLinks. Currently there are 3 items in each array, but you can easilyexpand on that by adding to the array. For example, to add a 4th record,you would simply include the following 2 lines at the end of setupLinksfunction:arrLinks[3] = "someURL.htm";arrTitles[3] = "Some title";*/function setupLinks() { arrLinks[0] = "http://forums.webdeveloper.com/forumdisplay.php?s=&forumid=3"; arrTitles[0] = "If you have any questions, be sure to visit our forums."; arrLinks[1] = "http://javascript.internet.com/new/"; arrTitles[1] = "Don't miss anything - check our new additions."; arrLinks[2] = "http://forums.xisto.com/no_longer_exists/;; arrTitles[2] = "Want to learn JavaScript? Start at the beginning.";}var m_iInterval;var m_Height;//window.onload = wl;var iScroll=0;var arrLinks;var arrTitles;var arrCursor = 0;var arrMax;window.onload=wl;function wl() { m_iInterval = setInterval(ontimer, 10); var base = document.getElementById("jump_base"); m_Height = base.offsetHeight; var divi = parseInt(m_Height/5); m_Height = divi*5; var td1 = document.getElementById("td1"); var td2 = document.getElementById("td2"); var td3 = document.getElementById("td3"); td1.height = m_Height-5; td2.height = m_Height-5; td3.height = m_Height-5; arrLinks = new Array(); arrTitles = new Array(); setupLinks(); arrMax = arrLinks.length-1; setLink();}function setLink() { var ilink = document.getElementById("jump_link"); ilink.innerHTML = arrTitles[arrCursor]; ilink.href = arrLinks[arrCursor];}function ontimer() { var base = document.getElementById("jump_base"); iScroll+=5; if (iScroll>(m_Height*2)) { iScroll=0; arrCursor++; if (arrCursor>arrMax) arrCursor=0; setLink(); } if (iScroll==m_Height) { pause(); m_iInterval = setTimeout(resume, 4000); } base.scrollTop=iScroll;}function pause() { clearInterval(m_iInterval);}function resume() { m_iInterval = setInterval(ontimer, 10);}Then copy this code into a html file, you can name it whatever you want: <html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Vertical Scroll</title><style type="text/css"><!--#jump_base { overflow-y:hidden; width: 200px; height: 100px; border: 2px dotted #000099; margin: auto; padding: 0 10px 0 10px; font-size: .9em; font-family: Verdana, Arial, sans-serif;}#jump_base a { color: #000099; background-color: inherit;}.news { background-color: #DDDDDD; color: inherit;}//--></style><script type="text/javascript" src="vertical.js"></script></head><body><div align="center"><center><div id="jump_base" class="news" onmouseover="pause()" onmouseout="resume()"> <table class="news"> <tr> <td id="td1"> </td></tr> <tr><td id = "td2" valign="middle" align="center"><a id="jump_link" href="" target="_new"></a></td></tr> <tr><td id="td3"> </td></tr> </table></div><p><div align="center"><font face="arial, helvetica" size"-2">Free JavaScripts provided<br>by <a href="http://javascriptsource.com">The JavaScript Source</a></font></div><p></center></div></body></html>Because all this code is copyrighted i dont remove anything of it. best regards,
-
Yes, sorry for that, right now i'm very busy with a lot of work and in a few hours i will try to upload a new version with some changes. Well, i just upload the new version, it works but i have some trouble with date's checking, also im not finished yet the 20s time counter, i think im in the correct way. When i finish i will post all the code. best regards,
-
Hi, tell me something, i dont know if im correct or not, but when you click any of your flag image links you are redirecting to the altavista babelfish translation service, does this is your intention or does this links have to redirect to the translated version of your site?if it is the second option, well you have to correct it.best regards,
-
How Do I Do Script Checking & Validation In PHP?
TavoxPeru replied to lonebyrd's topic in Programming
:-) dont worry aboUt that, as i promised, in the next hours i will upload the next stage of the trivia script, that involved the Use of a database. best regards, -
Hi, i just start this project in my spare time i have today, you can see it Here thanks to Xisto.com. It is not finished yet, but for a start is ok. First of all, you must register to access the trivia script, so, when you click in the above link you access the registration process, complete the form and if the data is ok the script will send you your access data to the email you give. This email includes an activation link that you must click to activate your account and after that you can login, if you dont do it you cannot access the trivia script. The trivia script will present user-defined trivia questions along with choices and determine whether or not the visitor entered the correct answer. Features randomized question and choice order along with 100% templates. All the question, choices and answers are stored in a simple text file. So, as you can see, this is not the best solution, in the next version i will use a database to store the questions, choices and answers as other information, and also implement the 20 seconds counter. Best regards,
-
How Do I Do Script Checking & Validation In PHP?
TavoxPeru replied to lonebyrd's topic in Programming
Hi, now you can see the complete script online thanks to Xisto.com. Please visit: My Registration Page to test it. Best regards, -
Hi, somebody knows where could i find these image splitter freeware???? because of my HD's death a few months ago i loose it, and now i cant find it anywhere. best regards, PS: i hope this is the correct location to my request, if dont, please let me know. ***** I FOUND IT 2006/05/18 ******* Well, at last i found this cool freeware, so i post some info aboUt it: Splitz allows you to split any image into rectangular parts and export the resulting images along with the HTML table that puts them back together. This allows webmaster to create for creating mouseover effects and offers an alternative to imagemaps. It supports many images formats and includes smart JPEG compression as well as basic color balancing filters. Also, this freeware doesn't need to be installed, just unzip in any folder and run. You can download Splitz Here If you cant download it please let me know so i send you by PM.
-
Hi, I just download this browser to test it, and my first opinion is that this IE based browser is really nice, use low memory, start up very fast, comes with the major options offered by other browsers like tabbed windows, skins, external toolbars, plugins, etc. Two features i like a lot are first, that it is the ¿First? Multilingual Browser -with more than 10 different languages giving the posibility to change all the interface- and second, the great functionallity to turns on/off images with a single click, im not really sure but i think that this feature is not included in other browsers -not in this way-, and definitively it will attrack a lot of users especially those with slow connections. Best regards,
-
Tabbed windows was the first thing that i like very much and got my complete attention about FF, then i discovered the FF extensions and plugins and all the diferent ways to customize and extend FF and i loved it too, but nothing is perfect and never will be, and this start to complicate my experience with FF because many are buggy and make FF crashes a lot :-(. When it happens i discover the MSN Search Toolbar for IE, and my surprise after download and install it in my PC was that this toolbar adds to IE the FF tabbed windows functionality and happily it works very fine :-). Other additions of this toolbar are: pop-up blocker, option to search directly from the toolbar, option to highlight your search terms in the same window or in a separate window, buttons to access directly to your hotmail inbox and to your msn messenger. So, if you wanna try it go to MSN Search Toolbar BTW, CAPTAINRON, thanks for sharing your excellent information. Best regards,
-
New Release: PHP Designer 2006 final beta is out
TavoxPeru replied to Quatrux's topic in Websites and Web Designing
Well, you can find a lot of good tutorials in the net, but i recomend you to start with the official php documentation, download here. BTW, i'm haven't done much coding on it yet only a few test scripts and I got a little frustrated with the debuger, when i run a script the debugger shows the source code instead of the result, and the same thing happens every time i run a script in an external window, maybe it is because a misconfigured value. Does anybody have the same problem? Regards, -
Well, as you suggest i visit that site with both browsers i use everytime -IE 6 SP1 and Firefox 1.5.0.3- and hover over the sentence and nothings happens in both browsers. So i view the source code to check why nothing happens when someone hovers over the sentence and i find the answer to this. Nothing happens because the page dont load an external javascript file -in this case named animate.js- because this file is not uploaded to the server. For your problem with FTP Firefox have some extensions that can help you. Check this if you want: FireFTP: FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. Digger: Allows you to navigate to parent directories in a URL, switch to the ftp equivalent of an http site (or vice versa), and climb through subdomains (e.g. go to example.com/ from sub.example.com/), all from a context menu on the Go button (and on the toolbar button provided by Go Up, if you have that extension installed). Digger was originally based on the Adam Lock's Diggler extension. Diggler: Diggler is a small but powerful add-on for Firefox and Mozilla. It adds a menu button next to the address bar with actions relevant to the current URL, for example to step out to the parent directory, or to visit the equivalent ftp URL, or to visit the site in archive.org. A single click on the menu button also clears the location bar (much like the one in Konqueror) - useful for keyboard free browsing.
-
How Do I Do Script Checking & Validation In PHP?
TavoxPeru replied to lonebyrd's topic in Programming
If you want that your registration/login page be the first thing visitors see why you dont rename it to be index.php??? doing this you get what you want. Another way is to use the Apache Redirect directive in your httpd.conf file or in an .htaccess file. # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example: # Redirect permanent /foo http://forums.xisto.com/no_longer_exists/ Also your url is not complete, in this case the server assumes that the browser is requesting the default file in the directory /ftv_registration, that would be index.html, index.php or whatever file that was set in your server configuration. You must replace your nickname and password variables with your username and password of your MySql database. I completely change your registration.php file and your activation.php file because you have some errors, use this instead, also i join both files into only one file. registration.php file http://forums.xisto.com/no_longer_exists/; <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <style type="text/css"> body { background-color _linenums:0'><?php require("config.php"); // In your original file you never include this file, which is the one that connects to the databaseinclude("login.php"); require("functions.php"); ?><HTML><HEAD><TITLE>Registration http://forums.xisto.com/no_longer_exists/ HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><style type="text/css">body { background-color:#131313; font-family:Verdana, Arial; font-weight:bold; font-size:9px; color:#FFFFFF;}.register_box { border: 1px solid #323232; background-color: #202020; font-family: Verdana, Arial; font-weight: bold; font-size: 9px; color: #FFFFFF; } </style></head><body><?php// The following line verifies which action is requested by the user // by default is setting to new if nothing is requested $action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : "new";switch($action) { //-------------------------------------- // [New Registration] //-------------------------------------- case "new": if(!isset($_POST['register'])) { echo " <form action='registration.php' method='POST'> Name: <br /> <input type='text' name='name' class='register_box'> <br /> Email: <br /> <input type='text' name='email' class='register_box'> <br /> Nickname: <br /> <input type='text' name='nickname' class='register_box'> <br /> Password: <br /> <input type='password' name='password' class='register_box'> <br /> <input type='submit' name='register' value='New Registration!' class='register_box'> <input type='hidden' name='action' value='new'> </form> "; } elseif(isset($_POST['register'])) { $name = mysql_real_escape_string($_POST['name']); $email = mysql_real_escape_string($_POST['email']); $nickname = mysql_real_escape_string ($_POST['nickname']); $password = mysql_real_escape_string($_POST['password']); $activation_code = generateCode(25); $nameq = "SELECT name FROM registration WHERE username = '$name' LIMIT 1"; $emailq = "SELECT email FROM registration WHERE email = '$email' LIMIT 1"; //put errors into an array I need to change these if I change the db $errors = array(); if(empty($name)) { $errors[] = "The name field was blank! <br />"; } if(mysql_num_rows(mysql_query($nameq)) > 0) { $errors[] = "The name given is already in use! Please try another one! <br />"; } if(empty($email)) { $errors[] = "The email field was blank! <br />"; } if(mysql_num_rows(mysql_query($emailq)) > 0) { $errors[] = "The email given is already in use! Please try another one! <br />"; } if(mysql_num_rows(mysql_query($nickname))>0) { $error[] = "That nickname is already taken. Please try another one.<br />"; } if(empty($password)) { $errors[] = "The password field was blank! <br />"; } if(count($errors) > 0) { foreach($errors as $err) { echo $err; } } else { $sqlq = "INSERT INTO registration (name, email, nickname, password, is_activated, activation_code)"; $sqlq .= " VALUES ('$name', '$email', '$nickname', '".md5($password)."', '0', '$activation_code')"; mysql_query($sqlq) or die(mysql_error()); echo "Thanks for registering! You will recieve an email shortly containing your validation code, and a link to activate your account!"; mail($email, "New Registration, http://forums.xisto.com/no_longer_exists/;, "Thanks for registering on FTV.\n\nHere are your login details:\n\nNickname: ".$nickname."\n\nPassword: ".$password."\n\nIn order to login and gain full access, you must validate your account.\n\nClick here to validate:\n\nhttp://forums.xisto.com/no_longer_exists/registration.php?action=activate&nickname;); // \n is equal to a new line// in your original version you use the variable user to send the nickname data // to your activation file and in that file you check for a variable nickname, so it never work. } } break; case "activate": //-------------------------------------- // [Activate Account] //-------------------------------------- if(isset($_GET['nickname']) && isset($_GET['code'])) { $nickname = mysql_real_escape_string($_GET['nickname']); if(mysql_num_rows(mysql_query("SELECT email FROM registration WHERE nickname = '$nickname'")) == 0) { echo "That username is not in the database!"; } else { $activate_query = "SELECT is_activated FROM registration WHERE nickname = '$nickname'"; $is_already_activated = mysql_fetch_object(mysql_query($activate_query)) or die(mysql_error()); if($is_already_activated->is_activated == '1') { echo "This user is already activated!"; } else { $code = mysql_real_escape_string($_GET['code']); $code_query = "SELECT activation_code FROM registration WHERE nickname = '$nickname' LIMIT 1"; $check_code = mysql_fetch_object(mysql_query($code_query)) or die(mysql_error()); if($code == $check_code->activation_code) { $update = "UPDATE registration SET is_activated = '1' WHERE nickname = '$nickname'"; mysql_query($update) or die(mysql_error()); echo "User $nickname has been activated! Thanks! You may now login!"; } else { echo "The activation code was wrong! Please try again!"; } } } } else { echo "No ID or user given to activate!"; } break; }?> </body></html>?> Best regards, -
Your SQL Insert statement is wrong, you confused it with the UPDATE SQL Statement, the correct way to write it is: $sql9="INSERT INTO User(Username, Password, Name, Last, Sex, Month, Day, Year, Adresse, City, State, Zipcode, Country, Phone, Email, Father_Name, Mother_Name, Parent_Phone, Parent_Email, Level, Academic) Values('$Username', '$Password', '$Name', '$Last', '$Sex', '$Month', '$Day', '$Year', '$Adresse', '$City', '$State', '$Zipcode', '$Country', '$Phone', '$Email', '$Father_Name', '$Mother_Name', '$Parent_Phone', '$Parent_Email', '$Level', '$Academic')";mysql_query($sql9) or die(mysql_errno(). ": " . mysql_error() );I dont include the id field because i think it is an integer autonumeric field, let me know if im wrong about it, also you must verify all your data prior to your insertion, maybe using javascript in your forms page and another good practice to prevent sql injections is the use of the mysql_real_escape_string function if your system has the magic_quoutes_gpc off. Best regards,
-
How Do I Do Script Checking & Validation In PHP?
TavoxPeru replied to lonebyrd's topic in Programming
If someone wants the complete solUtion i develop please PM me to send it, of course its not absolutely complete but for a start is good enough i think.best regards, -
Dynamicdrive: Good Site For JavaScript Codes
TavoxPeru replied to MOOSE1405241519's topic in Programming
That IP corresponds to your local machine. Regards, -
Hi:Another reason to choose Firefox is that IE works with Windows XP or superior OS, if you still use -as myself- for example Windows 2000 you cant install it.regards,
-
Two New Jobs for the portafolios
TavoxPeru replied to Ehecatl's topic in Graphics, Design & Animation
The first one is very nice specially the efect of the leaves that become the menu, but any link works. The second one open a pop up as mentioned earlier by Abhiram, if you disable the script by pressing the Yes button the movie loose control until you uncheck the loop option in the contextual menu of it, and again the link in the upper right corner doesn't work too. regards, -
Sorry folks i confused what is deprecated, so you are right, the HR has not been deprecated, some of its attributes has been. regards, This is the code: <hr color='#663300' size='2'> And generate the following warning: Warning: <hr> proprietary attribute "color" The tag contains an attribute that is proprietary to Netscape or Internet Explorer. The solution is this and works with IE and Firefox: <hr style="color:#663300; height:2px; BACKGROUND-COLOR:#663300;"> regards,