Jump to content

Alidad

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Alidad

  1. Hi, I'm creating small form for sign up, one of the text field called "username", I would like to have check available user name from database, if that user name are taken then send message right away after submit it. If user name avalaible then go on to next process. I wrote small php code for some reason is not working right. I would appreication if you can help me to see what did i missed or correct it please. My database table name member. The field in database called username. The text filed in the form called username. // <? php Open conection to the database mysql_connect('localhost', 'root', '3250'); mysql_select_db('member'); // Function to check if a username exists inside the database function check_user_exist($username) { $username = mysql_escape_string($username); echo "user name is not available"; } // Username is available return array('yes'); } ?> please help me thanks. AM
  2. yes i total understand this but the problme i have is that is not carry the text type write, i like to have with text type writer with user name, i could not figure out why is not carry to other page with text type writer ! does any one know what went wrong with that code! AM
  3. thanks so much for your help, but is not working for me, i have tested your code and i undersand this code and I have tried to make change to make work but still not working. Is that possible that you can help me again, can you possible to put combine togther in php and javascripts to show animation text with session variable please! AM
  4. Please copy this code and run on your editor and see preview, as you can see when you type user name and it will show text type writer after press enter, these code is under javascripts. Now i want to change to session variable in php code, if person log in by type the user name in log.php and redirect to home page index.php to show "Welcome [user_name]", how is that possible to write code in php to show text type writer in session variable in home page after they log in log.php page! please help! see code in bottom: <html> <head> <title>Decrypting Text Effect</title> <style> a:visited{color:black;font-family:verdana} a:link{color:black;font-family:verdana} a:hover{color:blue;font-family:verdana} td {color:black;font-family:verdana;font size:8pt} p {color:black;font-family:verdana;font size:8pt;text-decoration: none} h1 {color:black;font-family:verdana;font size:12pt;text-decoration: none} </style> <script language="javascript"> var got; var chars; function change() { var randstring = ""; var rslength = chars.length - got.length; var decrypted = document.getElementById("decoded"); var encrypted = document.getElementById("encoded"); for(var x=0;x<rslength;x++) { i = Math.floor(Math.random() * chars.length); randstring += chars.charAt(i); } if(randstring.charAt(0) == chars.charAt(got.length)) { got += randstring.charAt(0); decrypted.innerHTML = got; } else { encrypted.innerHTML = randstring; } if(chars.length > got.length) { setTimeout("change()", 10); } else { encrypted.innerHTML = ""; } } function startdecrypt() { var decrypted = document.getElementById("decoded"); var encrypted = document.getElementById("encoded"); decrypted.innerHTML = document.getElementById("firstN").value; chars = decrypted.innerHTML; decrypted.innerHTML = ""; got = ""; setTimeout("change()", 10); } </script> </head> <body> Enter your name here: <input type="text" id="firstN"> <input type="button" onClick="startdecrypt()" value="Start"> <p> <span id="decoded">Your text goes here.</span><span id="encoded"></span> </p> </body> </html> (edited to add tags)
×
×
  • Create New...

Important Information

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.