[Solved] How do i MD5 crypt password at registration?

You need to use like that for your INSERT Statement: $user_password= md5($_REQUEST[‘user_password’]); Now how can you select md5() password from database after insertion? Its very simple, you must need to follow same step: $user_password= md5($_REQUEST[‘user_password’]); // your input with md5 MD5() PHP Manual As per manual, it will return you the hash as a 32-character … Read more

[Solved] I want calendar to appear when pressed on my date textfield and the user should be able to select date from that calendar [closed]

HTML5 browsers have built-in support for date pickers. To do what you are asking you only need to change the type of your input field to date. Like this: <input id=”date”type=”date” name=”text” class=”input”> solved I want calendar to appear when pressed on my date textfield and the user should be able to select date from … Read more

[Solved] Timer recorded in php

You could use setInterval to increment some number every second, starting the interval when the input gets focus, and clearing the interval when it loses focus. var timeSpent = 0; var interval; document.getElementById(‘password2’).addEventListener(‘focus’, function() { interval = setInterval(function() { timeSpent++; document.getElementById(‘timeSpent’).value = timeSpent; }, 1000); }); document.getElementById(‘password2’).addEventListener(‘input’, function(event) { if (interval && event.target.value === document.getElementById(‘password’).value) … Read more

[Solved] Error: you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

Error: you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use solved Error: you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

[Solved] displaying the html entities in php code

Use PHP pre defined $_SERVER variable : $_SERVER[‘PHP_SELF’] <html> <body> <form action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>” method=”post”> <input type=”text” name=”keywords” id=”keywordsid” value=”sample keyword” /> <input type=”submit”> </form> <?php if(isset( $_POST[‘keywords’])) { echo $_POST[‘keywords’]; } ?> </body> </html> Here, <?php echo $_SERVER[‘PHP_SELF’]; ?> helps you to get result on the same page without sending the request to … Read more

[Solved] I need to join two tables in php [closed]

This code did not suddenly stop working, it never could have worked with its present query syntax. Change the query to this – $q2 = $pdo -> prepare(‘INSERT INTO allbets (user, bet, komanda, teams, cof, data, image) VALUES ($user, $bet, $komanda, $teams, $cof, $data, (SELECT `users2`.`image` FROM `users2` WHERE `username` = ?)); Do yourself a … Read more

[Solved] Notice: Array to string conversion ERROR [closed]

First you need to change: foreach ($traits[$i] as $trait) To: foreach ($traits as $trait) Then realize that $trait is still an array. So instead of echo ‘<BR>’.$trait, $test, $i + 1; You want to still loop through that array: foreach($trait AS $value) Now you can echo out your $value foreach ($traits as $trait) { foreach($trait … Read more

[Solved] Downloading files with curl in PHP [closed]

Im not sure what is your problem. If you just don’t know how to use CURL – here you have example: $oCurl = curl_init(); // initialize curl object $url=”http://domain.com/page”; curl_setopt($oCurl, CURLOPT_URL, $url); // set URL $siteContent = curl_exec($oCurl); // you will get HTML or other file contents here 0 solved Downloading files with curl in … Read more

[Solved] jquery ajax fileupload [closed]

It is inevitable that you will have to use a “plugin” to your definition, but… Here’s the good news: There’s a really good, easy to use, simple to code jQuery-File-Upload by blueimp that you can Download Here. You wanted it simple: Since you are looking for it to be a simple, basic jQuery… You can … Read more

[Solved] Notice: Undefined variable: [closed]

The error is here: if($admin_username && $admin_password && $admin_token == session_id()) It seems quite likely this is line 63. The problem is you are only defining $admin_username if $_SESSION[‘admin_username’] is set. Although you don’t show it in your code example, I’d presume that the same thing is true of $signin_username. Solution #1 – use isset … Read more