$connect = mysqli_connect(“localhost”, “root”, “”, “tracking”);
if(isset($_POST[“submit”]))
{
if($_FILES[‘file’][‘name’])
{
$filename = explode(“.”, $_FILES[‘file’][‘name’]);
if($filename[1] == ‘csv’)
{
$handle = fopen($_FILES[‘file’][‘tmp_name’], “r”);
while($data = fgetcsv($handle))
{
$item1 = mysqli_real_escape_string($connect, $data[0]);
$item2 = mysqli_real_escape_string($connect, $data[1]);
$item3 = mysqli_real_escape_string($connect, $data[2]);
$item4 = mysqli_real_escape_string($connect, $data[3]);
$item5 = mysqli_real_escape_string($connect, $data[4]);
$item6 = mysqli_real_escape_string($connect, $data[5]);
$query = “INSERT into messages(id, tracking_id, cfirstname, clastname, email, message) values(‘$item1′,’$item2′,’$item3′,’$item4′,’$item5′,’$item6’)”;
mysqli_query($connect, $query);
}
fclose($handle);
echo “<script>alert(‘Import done’);</script>”;
}
}
}
?>
I’m welcoming π
Better to save your excel file in .CSV format that will handle your task and you will drop few lines.
you can also do this
while (($emapData = fgetcsv($file, 10000, “,”)) !== FALSE) {
if($flag) { $flag = false; continue; }
// rest of your code
}
while (($emapData = fgetcsv($file, 10000, “,”)) !== FALSE) {
if($flag) { $flag = false; continue; }
// rest of your code
}
I don’t think that will skip one line.
rates
Greetings
We are looking for a PHP developer for Cochin Location.
Should have minimum 4 Years of experience.
Interested candidate please drop your CV at career@novelworx.io
Employment type – Contract for 3 months
Skill requirement-PHP5,Cloud/server development
$date = ‘2017-07-00’;
$date = date(‘FY ‘, strtotime($date));
echo “\uploads\{$date}”;
$dir = $date;
if (!is_dir(“\uploads\{$date}”)) {
mkdir(“\uploads\{$date}”, 0777, true);
}
Warning: mkdir(): Permission denied in C:xampphtdocsfilereporttest.php on line 7”
try launching xampp as admin
Use uuid
its a simple php function
@competative_programming
About The Job
The primary role would be is to analysing clients requirements and deliver scalable and flexible solutions. Design , Build and Web Based applications using Microsoft platform. Technologies C# , NET ASP.NET MVC JQuery SQL Server OOPS Javascript HTML , CSS , Bootstrap (Knowledgeable) Proactively benchmark application code to mitigate performance and scalability issues. Identify the strategies to increase the performance and scalability of the application. Ensure and deliver a high – level and detailed Design documentation of developed solutions. Candidates should be able to work as an independent team member , capable of applying judgment to plan and execute your tasks. Ensure timely delivery with minimal defects and rework. Should communicate with the senior Technical Team. Take up assignments in coding , testing and any other proof of concept / R D that is required for the organization Industry:IT – Software / Software Services
{
$view_data = AppViewLike::where(‘video_id’,$request->video_id)->where(‘phone_id’,$request->phone_id)->where(‘type’,$request->type)->first();
if($request->type == “view”)
{
if(count($view_data) == 0)
{
$flag = true;
}else{
$flag = false;
}
}else{
if($request->value == 0){
$view_data = AppViewLike::where(‘video_id’,$request->video_id)->where(‘phone_id’,$request->phone_id)->where(‘type’,$request->type)->delete();
$flag = false;
}else{
if(count($view_data) == 0)
{
$flag = true;
}else{
$flag = false;
}
}
}
if($flag == true)
{
$save_data = array(
‘video_id’ => $request->video_id,
‘phone_id’ => $request->phone_id,
‘type’ => $request->type,
);
// dd($save_data);
AppViewLike::create($save_data);
if($request->type == “view”)
{
$video_data = AppVideo::where(‘id’,$request->video_id)->first();
$total_view = $video_data->view + 1;
AppVideo::where(‘id’,$request->video_id)->update(array(‘view’=>$total_view));
}
return Response::json([
‘status’ => true,
‘message’ => “Success”,
]);
}else{
return Response::json([
‘status’ => false,
‘message’ => “Success”,
]);
}
}
How to add ->doesntExist(); in video_id with where clause ? I want that if video_id already present then don’t insert the data. How to do this ?
How to track users post in facebook, probably monitor it for some days if it really exits
$connect = mysqli_connect(“localhost”, “root”, “”, “tracking”);
if(isset($_POST[“submit”]))
{
if($_FILES[‘file’][‘name’])
{
$filename = explode(“.”, $_FILES[‘file’][‘name’]);
if($filename[1] == ‘csv’)
{
$handle = fopen($_FILES[‘file’][‘tmp_name’], “r”);
while($data = fgetcsv($handle))
{
$item1 = mysqli_real_escape_string($connect, $data[0]);
$item2 = mysqli_real_escape_string($connect, $data[1]);
$item3 = mysqli_real_escape_string($connect, $data[2]);
$item4 = mysqli_real_escape_string($connect, $data[3]);
$item5 = mysqli_real_escape_string($connect, $data[4]);
$item6 = mysqli_real_escape_string($connect, $data[5]);
$query = “INSERT into messages(id, tracking_id, cfirstname, clastname, email, message) values(‘$item1′,’$item2′,’$item3′,’$item4′,’$item5′,’$item6’)”;
mysqli_query($connect, $query);
}
fclose($handle);
echo “<script>alert(‘Import done’);</script>”;
}
}
}
?>
Yes we can
And I already did that
Correct
Use multiple attribute
How to track users post in facebook, probably monitor it for some days if it really exits
For some days….. You can track but it’s not legal
Could I get more light on that?. How
Nope because it’s illegal you may get blocked and banned.
{
$view_data = AppViewLike::where(‘video_id’,$request->video_id)->where(‘phone_id’,$request->phone_id)->where(‘type’,$request->type)->first();
if($request->type == “view”)
{
if(count($view_data) == 0)
{
$flag = true;
}else{
$flag = false;
}
}else{
if($request->value == 0){
$view_data = AppViewLike::where(‘video_id’,$request->video_id)->where(‘phone_id’,$request->phone_id)->where(‘type’,$request->type)->delete();
$flag = false;
}else{
if(count($view_data) == 0)
{
$flag = true;
}else{
$flag = false;
}
}
}
if($flag == true)
{
$save_data = array(
‘video_id’ => $request->video_id,
‘phone_id’ => $request->phone_id,
‘type’ => $request->type,
);
// dd($save_data);
AppViewLike::create($save_data);
if($request->type == “view”)
{
$video_data = AppVideo::where(‘id’,$request->video_id)->first();
$total_view = $video_data->view + 1;
AppVideo::where(‘id’,$request->video_id)->update(array(‘view’=>$total_view));
}
return Response::json([
‘status’ => true,
‘message’ => “Success”,
]);
}else{
return Response::json([
‘status’ => false,
‘message’ => “Success”,
]);
}
}
How to add ->doesntExist(); in video_id with where clause ? I want that if video_id already present then don’t insert the data. How to do this ?
select the row and check if length of video_id is greater than 0
I want to be able to check if those submitted post links are actually made by the user and also if it’s been on his timeline for desired number of days.
Good Morning Friends
I Have Web And App Development Team And Accept A Project To Do Work.
And We Are Also Accept IOS App And Native App Project