[Solved] php one variable on different pages [closed]

There are a few ways to give a variable to anothe page, i think you don’t use any frameworks, so I’ll explain just the basic ways: At first, start a Session. At the very first of your script, add this: <?php session_start(); ?> There must not be any other code before this, not even whitespace. … Read more

[Solved] Simple password encryption – how do i do? [closed]

In future, I’d suggest you refrain from begging for answers without first showing some code you’ve tried. That being said, I’ll bite. import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; public class EncryptHelper { public static String ehashAndSalt(String passedpass) throws NoSuchAlgorithmException, NoSuchProviderException { String passwordToHash = “password”; String salt = getSalt(); String securePassword = getSecurePassword(passwordToHash, … Read more

[Solved] Get Skype chat history from main.db synced to MySQL with PHP

If you have WAMPP running then just create a BAT file: copy /b/v/y C:\Users\YOURNAME\AppData\Local\Packages\Microsoft.SkypeApp_kzf8qxf38zg5c\LocalState\s4l-YOUR_SKYPE_NAME.db C:\wamp64\www\skype.db Then you have the DB file accessible with PHP $db = new SQLite3(‘skype.db’); $results = $db->query(‘SELECT nsp_data FROM messagesv12’); while ($row = $results->fetchArray()) { // And here’s the data: // $messages[‘cuid’] // $messages[‘conversationId’] // $messages[‘creator’] // $messages[‘createdTime’] // $messages[‘content’] } … Read more

[Solved] how to display data from database (MySQL)? [closed]

It would be something like this: echo ‘<td><a href=”https://stackoverflow.com/questions/14226828/info.php?id=”.$row[‘id’].'”>’.$row[‘Email’].'</a></td>’; You’re passing the user id to the info.php page. This will only work if you have an Id column called Id in your table. Alternatively you can use Email instead of Id: echo ‘<td><a href=”https://stackoverflow.com/questions/14226828/info.php?email=”.$row[“Email’].'”>’.$row[‘Email’].'</a></td>’; Now, on the info.php you can do another query as such: … Read more

[Solved] How to connect to mysql database [closed]

<?PHP $user_name = “root”; $password = “”; $database = “addressbook”; $server = “127.0.0.1”; $db_handle = mysql_connect($server, $user_name, $password); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { print “Database Found “; mysql_close($db_handle); } else { print “Database NOT Found “; } ?> also you can refer this link 2 solved How to connect to mysql database [closed]

[Solved] password_verify() does not work

You need to retrieve the password from the database matching on the username. SELECT password FROM members WHERE psuedo = ? Then validate the supplied password matching the username. if (password_verify($_POST[‘password’], $userInfo[‘password’])) { //… valid user } else { //… invalid user } If it returns true, it means the username and password entered matches … Read more

[Solved] Having clause trouble

This and all your other questions smell like you’re doing some test or course. Shouldn’t it be time that you at least attempt to solve one of these questions yourself? select d.dname, AVG(salary) from department d inner join employee e on e.Dno = d.dnumber group by d.dname having avg(salary) > 33000 First of all, I … Read more

[Solved] Three joined tables query with many-to-many relationship in JPA [closed]

I think your SQL might look something like this: SELECT * FROM Hospital WHERE Postcode = 3000 AND Hospital_id IN (SELECT Hospital_id FROM Hospital_Medical hm INNER JOIN Medical_Service m ON hm.Medical_id = m.Medical_id where Medical_name=”Emergency”) AND Hospital_id IN (SELECT Hospital_id FROM Hospital_Language hl INNER JOIN Language_Service l ON hl.Language_id = l.Language_id where Language_name=”English”) solved Three … Read more