39,320 Topics

Member Avatar for
Member Avatar for riccardo_1

Hi all, i'm currently workin on a project and i need to show on a maps the live position of my car. i have an arduino wich send every 5sec to my DB the position The problem is that i can't figure out how to refresh my polylines every 5second …

Member Avatar for rproffitt
0
1K
Member Avatar for Arya_2

is there a plugin for video rating in WordPress that visitor be able to rate thumbs up or thumbs down continuously thought that video I mean be able to rate thumbs up or thumbs downs during the time they watch the video? for example thumb up at 01:05 and thumb …

Member Avatar for rubberman
0
69
Member Avatar for Stefce

I have problem with selecting elements from array i have this code which is supposed to take the choosed element and echo it back but instead that this code just takes last element and echo it what is wrong with the code ? <div class="col-xs-3"> <?php global $m; $currencies = …

Member Avatar for Stefce
0
383
Member Avatar for kkavita060
0
104
Member Avatar for Sadiq_2

Good day ,wish to know how to upload multiple image files with multiple inputs and multiple directories. My code is <table border="1px" width="100%"> <tr><td colspan="3" style="background-color:#E8E8E8"><b>Supporting documents upload</b></td></tr> <tr><td> </td><td colspan="3"><input style="height:35px;" type="file" name="pri" required ></td></tr> <tr><td> </td><td colspan="3"><input style="height:35px;" type="file" name="oresult" required ></td></tr> <tr><td> </td><td colspan="3"><input style="height:35px;" type="file" name="oresult2" required ></td></tr> <tr><td> </td><td …

Member Avatar for series
0
2K
Member Avatar for Marco_4

Hello, how can I improve this form login with error alerts? For example, if the fields are empty, if entered data do not match any user, etc. etc. Right now my form is so, taking advantage of a class: if(isset($_POST['login'])){ //Retrieve the field values from our login form. $username = …

Member Avatar for diafol
0
395
Member Avatar for TheFearful

Hey everyone, I am trying to be able to have a textbox that only accepts numbers that is either 1 or greater but less than the number of items in a table from the databse. The queries work fine and such. What I'm trying to figure out is how to …

0
192
Member Avatar for bigignoramus

I have been wrestling with this subject for six months and can find no complete answer anywhere on the web or in any book seen. I have become very familiar with the debate and so it is not necessary to debate the following here. I had rather do all of …

Member Avatar for gentlemedia
0
2K
Member Avatar for Ivan_10

Hello there, I need a simple function which do something like tihs: I have folders like this: ext/test1/test1/index.html ext/test2/ ext/test1/test2/index.html ext/test3/ I need a function which gives me only folders with subfolders and files in it. The condition is to give a "ext/" folder in the function :) function get_subdirs('ext/') …

Member Avatar for rproffitt
0
211
Member Avatar for Amaina

This question is very similira to this [one](https://www.daniweb.com/programming/web-development/threads/472324/inserting-a-multidimensional-array-into-db) but with a little twist to it. I have an array that looks like this: Array ( [0] => Array ( [post_id] => 5410 [Issue] => 2010 [_Issue] => field_573d7fa8454e9 [_volume] => field_573d7f79ef9ab [volume] => 530 [_journals] => field_56d3de5ddc04d [pages] => 105-9 …

Member Avatar for Amaina
0
442
Member Avatar for Amaina

This question is similar to this [one](https://www.daniweb.com/programming/web-development/threads/371092/notice-undefined-index-id-on-line-26) However, my insert does not involve a form but a direct mysql query that looks like this $query2 = "insert into table(author,title,abstract) values(:author,:title,:abstract) "; $stm=$con->prepare($query2); $stm->bindValue(':author', $author, PDO::PARAM_STR); $stm->bindValue(':title', $title, PDO::PARAM_STR); $stm->bindValue(':abstract', $abstract, PDO::PARAM_STR); $stm->execute(); echo "$author &nbsp $title &nbsp $abstract <br>" In …

Member Avatar for Amaina
0
280
Member Avatar for Amaina

I want to insert multiple records to wp_posts table in word press using a mysql query and not the front-end. I also want these new records(that i insert into wp_posts) to insert metadata into wp_postmeta table. My question is how can i do this? How does wp_posts update wp_postmeta if …

Member Avatar for Amaina
0
755
Member Avatar for Aeonix

SELECT blabla FROM a INNER JOIN b ON a.a = b.b Is what I have. However I'd like to sort the results DESC by ID. I'd like to select last [`variable` x 10] of items sorted by ID DESC. Variable provided by PHP (I'll sort things out, I just need …

Member Avatar for hielo
0
312
Member Avatar for Aeonix

`Unknown column 'topics.id' in 'field list'` `SELECT topics.id topicId,` [...] `topics.id` DOES exist.

Member Avatar for cereal
0
4K
Member Avatar for tqmd1

What is the difference between following functions? Does these both functions perform same task? $wh_ope=clean($_POST['whop'])?(int)$_POST['whop'] : 0; $wh_ope=(int)clean($_POST['whop']); function clean($str) { $cstr=trim($str); $cstr=addslashes($str); $cstr=strip_tags($str); $cstr=htmlspecialchars($str); return $cstr; }

Member Avatar for cereal
0
113
Member Avatar for Aeonix

I don't think it's code-bound, but here's the code: http://pastebin.com/yWJ5qpwN What happens is... I input 2 different passwords, line 22 is for some reason entirely skipped. The script passes every verification, the SQL record is added, and further execution of code happens. User gets logged in and moved to `index.php` …

Member Avatar for cereal
0
250
Member Avatar for rayearth_1

i have a problem in showing two columns which is reff_number and Name in a combobox/select box, and now i can only display one column with it, if i have 9000 customer(in bahasa = pelanggan) , it will take an effort to find for user, and it will be easy …

Member Avatar for rayearth_1
0
2K
Member Avatar for SpottyBlue

Hi, I need help with the attendance form (index.php). When I tried to update the first row, nothing happened. For the last row, the message says, "**We couldn't update the attendance form at this time.**" Please check lines 96 and 101 to see if got any error. And also I …

Member Avatar for hielo
0
1K
Member Avatar for karthik_ppts

I have purchased SMS gateway from one hosting company. How can i integrate my SMS gateway with my website?

Member Avatar for swatisharma08
0
1K
Member Avatar for Aeonix

I need to create about 1000 users, with random (but normal looking names not "293dsaf81s234" but "Blue Air" (can be random dictionary words)). And I need to generate topics and posts, and many others things. Does anybody know a good way on how to generate dummy content in PHP? What …

Member Avatar for Aeonix
0
162
Member Avatar for abhi10kumar

How I replace my eregi_replace with preg_replace expression? eregi_replace($word, '<font style="background:' . $color . '";>\\0</font>', $text); and I how do I check preg_replace function is executed or not?

Member Avatar for cereal
0
321
Member Avatar for gogs85

Hi, i have was make small social network website and now i need to use RESTful API for hybrid application. Social network website i make in php, mysql. How to make API now? Do you have some tutorial for API that integrate in existing website? Thanks!

Member Avatar for divyakrishnan
0
137
Member Avatar for TheFearful

Hey everyone, I have a question about prepared statements for PHP and mySQL. I have been able to do them for a single row such as ID and such for a particular object, but is it possible to do a SELECT all command as well? I want to be able …

0
215
Member Avatar for showman13

I have a member table from which I'm trying to create a query using these fields mem_id / username / create_date / mem_status / ref_id / qualify_id A new member is mem_status 'F' with ref_id equal to the mem_id of their referrer and qualify_id of zero When the member upgrades, …

Member Avatar for showman13
0
330
Member Avatar for MatthewYeend

I've created a new member for a website (that I'm making for myself) to see if it works and when I register, I can get in, but when I go to log in after, it won't let me log in and I can re-create the same member multiple times. The …

Member Avatar for hielo
0
407
Member Avatar for TheFearful

Hey everyone, I have created a PHP web application that allows people of different permissions to do certain things such as read-only, add, update, or delete. That works pefectly. However, it came across my mind that I have not done anything to prevent against SQL injection or XSS attacks. I …

Member Avatar for TheFearful
0
385
Member Avatar for ramsiva

I have below code for getting the sundays. any body me to get saturdays $start = new DateTime('2013-01-06'); $end = new DateTime('2013-01-20'); $days = $start->diff($end, true)->days; $sundays = intval($days / 7) + ($start->format('N') + $days % 7 >= 7); echo $sundays;

Member Avatar for rubberman
0
115
Member Avatar for ramsiva

I have two dates like $date1 ="2016-05-01"; $date2 ="2016-05-31"; how to get saturday and sunday count like between range is 9

Member Avatar for rubberman
0
69
Member Avatar for ramsiva

Below is my code function getWorkingDays($startDate, $endDate){ $begin=strtotime($startDate); $end=strtotime($endDate); if($begin>$end){ echo "startdate is in the future! <br />"; return 0; }else{ $no_days=0; $weekends=0; while($begin<=$end){ $no_days++; $what_day=date("N",$begin); if($what_day>5) { $weekends++; }; $begin+=86400; }; $working_days=$no_days-$weekends; return $working_days; } } $beginday=date("2016-04-01"); $lastday=date("2016-06-30"); $nr_work_days = getWorkingDays($beginday,$lastday); echo $nr_work_days; ?> above code is giving count …

Member Avatar for hielo
0
239
Member Avatar for Aeonix

$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many questions: - What is `s` on the line 4? Do I need to bother with that? - What if I …

Member Avatar for diafol
0
238

The End.