forked from sarahdoi/Oun-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsendOffer.php
33 lines (25 loc) · 793 Bytes
/
sendOffer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
session_start();
include("connection.php");
include("functions.php");
$user_data = check_loginBabysitter($con);
$sitterId= $user_data['national_ID'];
$reqId = $_GET['id'];
if( isset($_GET["sent"]) && $_GET["price"]!="" )
$price= $_GET["price"];
$start = $_GET["start_time"];
$end = $_GET["end_time"];
$date = $_GET["date"];
//$co=conflict($start,$end,$sitterId , $date );
//if( mysqli_num_rows($co)==0 ){
$query = "INSERT INTO offer (babysitter_id, request_id, price, status)
VALUES ($sitterId , $reqId , $price ,'p') ";
$q=mysqli_query($con , $query);
mysqli_close($con);
Header( 'Location: JobRequest.php' );
/*}else{
echo '<script type="text/javascript">';
echo ' alert("You have conflect in your schedule!")'; //not showing an alert box.
echo '</script>';
}*/
?>