Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
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
nk101sharma1 authored Oct 13, 2023
1 parent cd11d28 commit 2fe5e1a
Show file tree
Hide file tree
Showing 5 changed files with 997 additions and 366 deletions.
25 changes: 25 additions & 0 deletions connect.php
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;
}
?>
31 changes: 31 additions & 0 deletions connect1.php
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';
}
}
?>













Loading

0 comments on commit 2fe5e1a

Please sign in to comment.