334 Posted Topics

Member Avatar for ronjacob

Just collect emails you want to sent to in an array variable, then after ending the looping, assign your $to in mail() with the value like `user@example.com, anotheruser@example.com` by simply implode the array. for detail mail() descriptions, please refer to http://php.net/manual/en/function.mail.php

Member Avatar for lps
0
232
Member Avatar for harinagarjuna

Post your codes here so that we can help, please don't assuming we are godlike that can simulate your situation directly.

Member Avatar for diafol
0
237
Member Avatar for UK-1991

Agreed with @pritaeas, everything is based on how you code. Based on your Db_connect.php in the question, what you should code is: $db = new DB_Connect(); $db->connect(); $connection = $db->connect(); $myquery = "SELECT * FROM users"; $results = $connection->fetch($myquery); foreach($results as $array) { echo $array['username'] . '<br />'; } $connection->close();

Member Avatar for diafol
0
2K
Member Avatar for AaTish_1

Wish to know what kind of 'section' did you means. Is it one of below? If no, please do explain more detail on what you wish to achieve. 1. how to embed videos? 2. how to made the alignment on page? 3. how to generated the post of videos onto …

Member Avatar for lps
0
188
Member Avatar for Mike Askew

Tested the code in my local and it works: <?php if($_POST){ var_dump($_POST); var_dump($_FILES); } ?> <form action="" method="post" enctype="multipart/form-data" style="padding-left:10px"> <p>Name: <input type="text" name="name"></p> <p>Date of Birth: <input type="text" name="dateofbirth"></p> <p>Description: <input type="text" name="description"></p> <p>Available For Adoption? <select type="text" name="available"> <option value="1" selected>Yes</option> <option value="0">No</option> </select> </p> <p>Image Of Animal:</p> …

Member Avatar for Mike Askew
0
308
Member Avatar for garyrichard

Maybe you should show us what you had already tried? My suggestion is to play with .htaccess

Member Avatar for garyrichard
0
107
Member Avatar for hrushi9

@hrushi9, I think your problem can be solve by creating custome post type and post thumbnails, try research on the topic. Through these 2, a custom tab can be created in admin panel sidebar. Then to display all the related things, please do customize the theme currently activated.

Member Avatar for hrushi9
0
235
Member Avatar for jonsan32

I tried to do using a pure jquery and here is the code: <h1 id="text">pr0digies</h1> <script> var count = 0; var interval = null; $(document).ready(function () { interval = setInterval(updateContent, 200); }); function updateContent(){ count++; console.log(count+" second passed"); if(count < 50){ $( "#text" ).html("pr"+count+"digies"); }else if(count < 100){ $( "#text" …

Member Avatar for jonsan32
0
613
Member Avatar for davy_yg

Please don't dump the whole codings here. PLEASE do narrow down to part where you suspect the code that messing the things and post it here.

Member Avatar for tobyITguy
0
190
Member Avatar for ehpratah

Wonder if this will get you the result. SELECT reservations.SDate, reservations.FoName, COUNT(reservations.FoName) AS 'opentrans', trans_logs.status, SUM( IF( trans_logs.status = 'Served', 1, 0 ) ) Served FROM reservations,trans_logs WHERE (reservations.SDate BETWEEN '" . $from . "' AND '" . $to. "') OR (trans_logs.datetime BETWEEN '" . $from . " 00:00' AND …

Member Avatar for ehpratah
0
292
Member Avatar for Roldan_1

Check your query with database structure. Check if database column of 'req_code' is unique. If it is not unique, it will tempt to update all the records that matched the req_code.

Member Avatar for Gideon_1
0
347
Member Avatar for paul-lucas

After joining the table, if you still found you data having duplicated info, maybe you should consider goes for 'DISTINCT' selection also.

Member Avatar for paul-lucas
0
335
Member Avatar for Roldan_1

Your "can't update" means the coonection failed or the db not updated or it always goes into `echo "Error updating record: " . $conn->error;` even db update? Any error thrown?

Member Avatar for lps
0
222
Member Avatar for harinagarjuna
Member Avatar for Betterwebsites4u

This is what I done to post the images files for upload and crop function postdata(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (theFile) { var dom = '<div style="position:relative;"><img id="tobecrop" src="' + theFile.target.result + '" alt="your image" style="width:100%" /><div id="resizeDiv" class="ui-widget-content trans-bg"></div></div>'; …

Member Avatar for lps
0
638
Member Avatar for AntonyRayan

Trigger an ajax to post to a process.php with the code process.php if(isset($_POST['myVal']){ session_start(); $_SESSION['myRef'] = $_POST['myVal']; }

Member Avatar for lps
0
212
Member Avatar for blueguy777

First of all, mysql_* has been depreciated. Use mysqli_* or PDO instead. The problem should be the query where the field should not having quoted in MYSQL. `$q = "insert into users (username,password,url,name,email,address,mobile,ip,dob) values ('$username', '$password', '$url', '$name', '$email', '$address', '$mobile', '$ip', '$dob')";`

Member Avatar for lps
0
238
Member Avatar for blueguy777

Agree with @jkon, please use the json_decode() to decode the json format into array. Then from the array, manually assign them into another variable(if it really needed).

Member Avatar for diafol
0
275
Member Avatar for James_43

If the problem solved by @diafol's suggestion, please mark this thread as solved. If it is not, try to confirm if the hosting support php as I previously face issue where a hosting do not provide it.

Member Avatar for James_43
0
235
Member Avatar for AntonyRayan

If you wish to match both table, make sure there are some unique keys for the tables to match to each other. `select representative.id, representative.mark_id, representative.rep_name, representative.father_name, representative.etc, rep_area.id, rep_area.rep_id, rep_area.dist_id, rep_area.etc from representative,rep_area where rep_area.id = representative.id;` This query is generated based on assumption that both table's id is …

Member Avatar for e.geofrey
0
208
Member Avatar for UK-1991

Based on your previous threads, I assume your p_date still is 'date' format in database. You can try @Zagga's idea by adding the die() to show the error, but now your problem is the query. Try out `SELECT * FROM presence WHERE p_date BETWEEN '$dateval1' AND '$dateval2' ORDER BY p_date` …

Member Avatar for Gideon_1
0
164
Member Avatar for mbarandao

If I am in the case, what I will do is add the select tag with id attribute, and the options with class attribute. Then use the jquery to bind the select tag with onchange() event and remove the same class element from other select tag.

Member Avatar for mbarandao
0
163
Member Avatar for UK-1991

Check this out: http://stackoverflow.com/questions/1218580/what-does-a-php-function-return-by-default The php function is default to return a 'NULL'. Therefore, your calling function didn't have a return statement thus causing the checking to be false.

Member Avatar for UK-1991
0
293
Member Avatar for wareez

`I have this code in my login.php, from sigin.php page if the user click on signin`@JerrimePatient, the form is in the sigin.php Agreed with @diafol's comments. In addition, from you code, I assume you haven't encode your password? To debug the problem, I suggest you to echo $sql before the …

Member Avatar for wareez
0
2K
Member Avatar for Niloofar24

Why you need to get the timestamp from php and update timestamp field in table? We can always use the `CURRENT_TIMESTAMP()` directly from mysql. Refer https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html for more options.

Member Avatar for Niloofar24
0
441
Member Avatar for UK-1991

Wondering what is needed here. 1. how many employee late for particular day? 2. how many days particular employee is being late through particular month/year? 3. did particular employee being late on particular day? Please do confirm which case is matched so that I can try to help.

Member Avatar for UK-1991
1
745
Member Avatar for chineerat

First of all, mysql_* has been depreciated, consider using pdo/mysqli_* Based on the situation, I will probably using ajax to retrieve the data for time consuming data. Example, I will start with the div with "loading data...", then when data finished loaded using ajax, simply replace the content of that …

Member Avatar for bugz313
0
380
Member Avatar for amln_ndh

First of all, mysql_* functions have been depreciated. Please consider using mysqli_* or pdo Based on your situation, I wish to know if the user is allowed to apply the leave for other user? If not, then it will just simply use the $_SESSION variable when user login. If yes, …

Member Avatar for lps
0
206
Member Avatar for mehnihma

The query problem is because your 'And' statement. Means if EUR is null but KN IS NOT NULL, the query still will not get the data.

Member Avatar for lps
0
146
Member Avatar for rpv_sen

As from what I see, it is probably because the process for the string containing html tag. Try to put this `htmlentities(setMyStatus($fetch[5]))`. But if you echo json_encode(), it will echoed the span tag as well. but if you will using the value in json_decode(), it will work fine.

Member Avatar for rpv_sen
0
525
Member Avatar for ramsiva

i don't know if it is posible to be done. But for me, it is not a good idea to assign a ajax result into php variable(mixing clint side and server side scripting)

Member Avatar for diafol
0
9K
Member Avatar for phoenix254

You can refer the api provided in http://api.jqueryui.com/draggable/, add to your code $( "#window" ).draggable({ containment: "parent" });

Member Avatar for lps
0
158
Member Avatar for semo5

First of all, please do indent your code when post it here. It is very difficult for us to read. Then, the code is not completed. 1. textarea, form, body, html missing corresponding closing tag. 2. Then, the form did not having the action to where it will post the …

Member Avatar for lps
0
320
Member Avatar for M Irfan

1. My mindset tell me that just rename the '.html' into '.php' can change the html template to php(provide the hosting support php). After that, we can use php functions to modify the templates accordingly. In the case of localhost, then we will need to start the apache server(As for …

Member Avatar for lps
0
171
Member Avatar for Niloofar24

Remove your code of $('.text p').css({ 'width': $('.text p').width(), 'height': $('.text p').height() }); I tested with the code below combining your css script and it is working fine. $('.nav').click(function() { /*$('.text p').css({ 'width': $('.text p').width(), 'height': $('.text p').height() });*/ $('.text').toggle("slow"); });

Member Avatar for lps
0
511
Member Avatar for Vivek_13

Actually your code working fine, the problem is mainly because your `$_GET['data']`. I had tested the code using the json string you provided in the thread @diafol mentioned and it is working fine: `$array = json_decode('{"courseId":"116","question":"asdasd","ansIndex":"1","ans0":"sadsa","ans1":"dsad","ans2":"sadasd","ans3":"asdasd"}',true);` ![test.jpg](/attachments/small/3/56bfcd62be9d92603700ce2f817144c2.jpg "align-left")

Member Avatar for Vivek_13
0
511
Member Avatar for Kalaivani Nair

It is because pdo will carry out the statement as `"SELECT * FROM posts,subjects WHERE posts.subid IN ('1,2') AND posts.pricing='100' AND posts.Poscode='56000' AND subjects.subid=posts.subid ORDER BY posts.Poscode DESC LIMIT 60"` There is several solution provided online. Here is one of the link I refer: http://stackoverflow.com/questions/1586587/pdo-binding-values-for-mysql-in-statement And here is the codes …

Member Avatar for Kalaivani Nair
0
342
Member Avatar for Vivek_13

What you mean by 'How to Convert In to Xml File'? Show us what had you done until now and we can help you.

Member Avatar for diafol
0
314
Member Avatar for blueguy777

@Aeonix, your query is having problem with the double quotes. `mysqli_query("INSERT INTO table (sn, mob_no, date, time) VALUES ($myarray["sn"], $myarray["mob_no"], $myarray["date"], $myarray["time"]));` The sn,mob_no,date,time will read as variable and is not defined.

Member Avatar for diafol
0
4K
Member Avatar for izham_1

If I am in the case, I will probably use round function as suggested by @pritaeas. After rounding upper half and lower half, I will compare and use it's nearest rounding value.

Member Avatar for lps
0
91
Member Avatar for UK-1991

Try googling for 'join query mysql'. Here is a link for referance http://www.w3schools.com/sql/sql_join.asp. Left join, right join, inner join etc all working for purpose. Normally I will decide which one to be used based on table structure for better performance.

Member Avatar for UK-1991
0
146
Member Avatar for phoenix254
Member Avatar for UK-1991

First of all, `$company = $_POST["company"];` will having undefined post. Then, the query `$query_update = "UPDATE users SET user_name = {$user_name}, f_name = {$f_name}, l_name = {$l_name}, company = {$company}, phone = {$phone}, fax = {$fax}, mobile = {$mobile}, email = {$email} WHERE u_id = ".$uid;` try echo it and …

Member Avatar for UK-1991
0
747
Member Avatar for kavithaje

I assumed your 'total number of employees' is not stored in database. You cannot join all these into one query except your employee_ID, First_name, Last_name can be duplicated. For example: if we got 3 rows of employee_ID of 'ID1' and 2 rows of employee_ID of 'ID2', then I will use …

Member Avatar for lps
0
180
Member Avatar for Sophia_1

First of all, please use the 'code' function to put you code. Then, the function `mysql_query()` is deprecated as of PHP 5.5.0 and the MySQLi or PDO_MySQL extension should be used instead. After that, check if the `$_POST['Notify2']` is valid, is the session variable is printed correctly? put the sql …

Member Avatar for cereal
0
592
Member Avatar for MartyWooly

I don't know if I helped but here is my way of doing things" 1. for better font, you can try embed some google fonts into it. Google fonts will generate the css you wish, so just use it in` body{}` 2. I will use the css max-width and allign …

Member Avatar for Tangerinejoe
0
192
Member Avatar for janicemurby

Your code should populate correctly, Just that I saw this line `while($row = mysql_fetch_array($state))` where `$state` is probably not defined.

Member Avatar for lps
0
271
Member Avatar for elamigosam

Please google through before you post your questions here... Anyway, you can refer http://stackoverflow.com/questions/14566929/php-and-mysqli-cannot-pass-parameter-2-by-reference-in for similar question.

Member Avatar for elamigosam
0
329
Member Avatar for chichi9

Ofcourse there is nothing shows up, see your js `$('#courseInfo').text();`, you only set the element text to empty while the field is already empty. If you want the value of the selected item, please use `$('#course').val()`

Member Avatar for chichi9
0
318
Member Avatar for phpcake

First, I need to know how you update the first 4 rows of data, are you using and ajax to update or a form post method to update? Then what is the code to update the database? These questions is needed for us to help you through you problem.

Member Avatar for lps
0
334

The End.