real_escape_string($name); $email = $conn->real_escape_string($email); $phone = $conn->real_escape_string($phone); $sql = "INSERT INTO users (name, email, phone, password) VALUES ('$name', '$email', '$phone', '$password')"; if ($conn->query($sql) === TRUE) { // Registration successful session_start(); $_SESSION['user_id'] = $conn->insert_id; $_SESSION['user_name'] = $name; header("Location: index.php"); exit(); } else { // Registration failed header("Location: index.php?error=registration_failed"); exit(); } } ?> real_escape_string($email_phone); $sql = "SELECT * FROM users WHERE (email = '$email_phone' OR phone = '$email_phone')"; $result = $conn->query($sql); if ($result->num_rows > 0) { $user = $result->fetch_assoc(); if (password_verify($password, $user['password'])) { // Login successful session_start(); $_SESSION['user_id'] = $user['id']; $_SESSION['user_name'] = $user['name']; header("Location: index.php"); exit(); } else { // Invalid password header("Location: index.php?error=invalid_credentials"); exit(); } } else { // User not found header("Location: index.php?error=user_not_found"); exit(); } } ?> connect_error) { die("Connection failed: " . $conn->connect_error); } ?> EasyDeal - Buy and Sell Anything

Buy and Sell with Confidence

EasyDeal connects buyers and sellers in a trusted marketplace. Find great deals or sell your items fast!

Popular Categories

Browse through our most popular categories to find what you're looking for

Real Estate

1,240 Properties

Vehicles

890 Vehicles

Electronics

3,150 Items

Furniture

1,870 Items

Fashion

2,560 Items

Services

980 Services

Featured Ads

Apartment for Sale
Featured

Luxury Apartment for Sale

$250,000
Dubai, UAE
2 days ago
Car

Toyota Camry 2020

$18,500
Riyadh, KSA
Today
Laptop
Featured

MacBook Pro M1 2021

$1,250
Cairo, Egypt
3 days ago
Furniture

Leather Sofa Set

$780
Doha, Qatar
5 days ago

How EasyDeal Works

Simple steps to buy and sell on our platform

Create Account

Register with your email or phone to start buying or selling

Post an Ad

Create your ad with photos, description and price

Connect & Deal

Communicate with buyers or sellers and make the deal

EasyDeal Mobile App

Download our app to buy and sell on the go. Available on iOS and Android.

Mobile App

Made with DeepSite LogoDeepSite - 🧬 Remix