Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8278215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:56:03+00:00 2026-06-08T08:56:03+00:00

I have a fixed username password and one variable text. this is first method

  • 0

I have a fixed username password and one variable text.

this is first method but it’s not safe:

<form action="http://site.com/foo.php" method="post">
  <input type="hidden" name="username" value="user123" />
  <input type="hidden" name="password" value="pass123" />
<input type="text" name="text" />
<input type="submit" />

</form> 

this is secound method Please complete this:

index.html

<form action="foo.php" method="post">
<input type="text" name="text" />
<input type="submit" />
</form> 

foo.php

$username = "user123";
$password = "pass123";

$text = $_POST["text"];

$url  = "http://site.com/foo.php?text=".$text."&password=".$password."&username=".$username;

HOW TO post $url safe? (without HTTPS)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:56:05+00:00Added an answer on June 8, 2026 at 8:56 am

    UPDATE:

    You can’t securely log in without HTTPS.
    This is terribly insecure, and doesn’t prevent people from logging in
    if they intercept the hash.
    Just use HTTPS.


    Use the MD5 function.

    e.g.

    $url = "http://example.com/foo.php?text=".$text."&password=".md5($password)."&username=".$username;
    

    Then on the receiving site (http://example.com/foo.php?...), check the received password with a hash (MD5) of the actual password.

    Example:

    sending file:

    $username = "user123";
    $password = "pass123";
    
    $text = $_POST["text"];
    
    $url = "http://example.com/foo.php";
    $data = "text=".$text."&password=".md5($password)."&username=".$username;
    
    $handle = curl_init($url);
    curl_setopt($handle, CURLOPT_POST, true);
    curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
    $result = curl_exec($handle);
    curl_close($handle);
    if($result) {
        // Success
    } else {
        // Failed
    }
    

    receiving file:

    $username = $_POST["username"];
    $password = $_POST["password"];
    
    // Insert code here to escape the username with mysqli_real_escape_string,
    // then retrieve data from database with MySQLi.
    
    if($password == md5($db_password)) {
        // Correct password
    } else {
        echo 'Incorrect password.';
    }
    unset($username, $password, $db_password); // For security, remove variables from memory
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally we have login page with username, password filed and signin button. Using the
EDIT: I have fixed all but two warnings now, so thank you all for
I have this fixed-width file with the widths being 34, 2, 3, 2, 1,
I want to have a fixed-width TextBlock that has long, unbroken, horizontal text, and
I have done quite a bit of research on this issue and have not
I have created custom component for displaying text with either Simple or Password mode,
I have this form, and i want to retrieve the data submitted in the
Did my best to not post this question but i just can not figure
Not a major question but definitely one that would be a nice one to
UPDATE - I have fixed some mistakes in the code below and the images

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.