-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A portfolio website is a website that showcases the work, skills, achievements, and experiences of an individual or a business in a visually appealing and organized manner. It serves as a digital portfolio, allowing creators, professionals, artists, designers, and companies to display their best work, projects, and accomplishments to a wide audience, typically on the internet.
- Loading branch information
1 parent
cd11d28
commit 2fe5e1a
Showing
5 changed files
with
997 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
$servername="127.0.0.1"; | ||
$username="root"; | ||
$password=""; | ||
$database="portfolio"; | ||
|
||
$conn=mysqli_connect($servername,$username,$password,$database); | ||
if(!$conn) | ||
{ | ||
echo "connection error"; | ||
}else{ | ||
echo "successfully connect"; | ||
} | ||
if($_SERVER[REQUEST_METHOD]=='POST') | ||
{ | ||
$name= $_POST['name']; | ||
$email= $_POST['email']; | ||
$number= $_POST['number']; | ||
$address= $_POST['add']; | ||
$msg= $_POST['message']; | ||
|
||
echo $name; | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
$conn = mysqli_connect('localhost', 'root', '', 'contact_ab') or die('connection Failed'); | ||
|
||
if(isset($_POST['send'])){ | ||
$name = mysqli_real_escape_string($conn, $_POST['name']); | ||
$email = mysqli_real_escape_string($conn, $_POST['email']); | ||
$number= mysqli_real_escape_string($conn, $_POST['number']); | ||
$msg = mysqli_real_escape_string($conn, $_POST['message']); | ||
$select_message = mysqli_query($conn, "SELECT * FORM 'contact_form' WHERE name = '$name' AND email ='$email' AND number = '$number' AND message = '$msg'") or die('query failed'); | ||
if(mysqli_num_rows($select_message) > 0){ | ||
$message[] = 'message sent already'; | ||
} | ||
else{ | ||
mysqli_query($conn, "INSERT INTO 'contact_form'(name, email, number, message ) VALUES('$name', '$email', '$number', '$msg')") or die('query failed'); | ||
$message[] = 'message sent successfully'; | ||
} | ||
} | ||
?> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.