PHP - Moved: Enabling Php Short_open_tag
This topic has been moved to PHP Installation & Configuration.
http://www.phpfreaks.com/forums/index.php?topic=356734.0 Similar TutorialsThis topic has been $verb->toPastTense() to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=354538.0 I need a way a user can upload a file onto my website(it's a shared site, I believe, but I own the domain), I've tried using the cURL library but it seems a bit over my head at the moment. And everything I tried with it would not result in a file being uploaded into any folder. What can I do what I need? I've searched around and never found anything that worked for me. Hi, I'm not too sure if this needs to be in the PHP or javascript section, because I'm not sure what the problem is. Basically, I have a register form, but right now I'm working with one field: Username. I have a "Continue" button that takes you to the next step of the registration. The continue button should be disabled until the username textfield has more than 3 characters, less than 15 characters, and the username cannot be taken(this is where i'm having trouble). The problem is that the button enables even when the username is already taken. It works fine with the min/max chars. All of this is dynamic, I will give the HTML, PHP, and javascript code below. HTML Code: [Select] <span class='title'>Character:</span> <input type='text' id='username' name='username' onkeyup="check();"><span id=error1></span> <span id=error2></span> PHP Code: [Select] <?php $user_name='Example'; if ($user_name=='Example') { echo "no"; } else { echo "yes"; } ?> Javascript Code: [Select] <script> err=0; function check() { $step1 = $('#step1'); var trigger = true; var username = document.getElementById('username'); username2 = document.getElementById('username').value; if (username.value.length <= 3) { err=1; document.getElementById('error1').innerHTML = '<img src=views/images/cross.png></img> Username is too short(4 characters min)'; }else if (username.value.length >= 16) { err=1; document.getElementById('error1').innerHTML = '<img src=views/images/cross.png></img> Username is too long(15 characters max)'; }else{ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ THE PROBLEM IS BELOW, THE FUNCTION ISN'T CALLING THE "err" variable ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------ $.post("[my domain was here]",{username:$(username).val() } ,function(data) { if(data=='no') { err=1; document.getElementById('error1').innerHTML = '<img src=views/images/cross.png></img> Chracter name has already been taken'; } else { err=0; document.getElementById('error1').innerHTML = '<img src=views/images/tick.png></img>'; } }); } if (err==0) { trigger=false; } trigger ? $step1.attr('disabled', true) : $step1.removeAttr('disabled'); } </script> Everything works fine. The problem, I think, is at the bottom of my javascript code. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=356314.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=325953.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=313579.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=343318.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=346829.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=356760.0 This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=319595.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=345722.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=328845.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=349322.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=319767.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318465.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=328917.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309960.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=328753.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318277.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=305825.0 |