Click here to Skip to main content
12,955,118 members (68,908 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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))
{
?>
   <div class="show_event">
       <img src="ico.png" style="float:left;" alt="" />
       <label style="float:left" class="text">
       <b><?php echo $row['EventInput'];?></b>
       <br />
       <?php echo $row['where_text'];?>
       <br />
       <?php echo date("F d, Y h:ia",$row['datepicker']);?>
       </label>
 
       <a href="#" class="delete" id="record-<?php  echo $row['id']?>">x</a>
        <br clear="all" />
   </div>
<?php
}
?>
Posted 3-Jan-13 1:15am
Updated 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
OriginalGriff 6,559
CHill60 3,550
Maciej Los 3,153
ppolymorphe 2,030
Jochen Arndt 1,975


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2017
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