Click here to Skip to main content
12,350,134 members (25,632 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: PHP MySQL
event.php
<?php
session_start();
 
include('connection.php');
 
function checkValues($value)
{
    $value = trim($value);
    if (get_magic_quotes_gpc())
    {
        $value = stripslashes($value);
    }
    $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));
    $value = strip_tags($value);
    $value = mysql_real_escape_string($value);
    $value = htmlspecialchars($value);
    return $value;
}
$limit = "";
$users_ip = $_SERVER['REMOTE_ADDR'];
 

if(@$_REQUEST['val'])
{
    $EventInput     = checkValues($_REQUEST['EventInput']);
    $datepicker     = checkValues($_REQUEST['datepicker']);
 
    $datepicker     = $datepicker.' '.$_REQUEST['start_time_min'];
    $datepicker     = strtotime($datepicker);
 
    $where_text     = checkValues($_REQUEST['Where']);
    $WhoInvited     = checkValues($_REQUEST['WhoInvited']);
 
    mysql_query("INSERT INTO facebook_event (EventInput,datepicker,where_text,WhoInvited,users_ip,date_created) VALUES('".$EventInput."','".$datepicker."','".$where_text."','".$WhoInvited."','".$users_ip."','".strtotime(date("Y-m-d H:i:s"))."')");
 
    $limit = "limit 1";
}
 
$result = mysql_query("SELECT * FROM facebook_event where users_ip = '".$users_ip."'  order by id desc " .$limit);
 
while ($row = mysql_fetch_array($result))
{
?>
Posted 3-Jan-13 1:15am
Edited 3-Jan-13 10:52am
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

This is a code dump, not a question. The answer is, make your code check the logged in user id, and emit the event if it's required.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100