334 Posted Topics
Re: 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 | |
Re: Post your codes here so that we can help, please don't assuming we are godlike that can simulate your situation directly. ![]() | |
Re: 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(); ![]() | |
Re: 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 … | |
Re: 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> … | |
Re: Maybe you should show us what you had already tried? My suggestion is to play with .htaccess | |
Re: @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. | |
Re: 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" … | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: After joining the table, if you still found you data having duplicated info, maybe you should consider goes for 'DISTINCT' selection also. | |
Re: 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? | |
Re: I also don't understand your question.....what about posting codes for us to simulate? | |
Re: 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>'; … | |
Re: Trigger an ajax to post to a process.php with the code process.php if(isset($_POST['myVal']){ session_start(); $_SESSION['myRef'] = $_POST['myVal']; } | |
Re: 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')";` | |
Re: 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). ![]() | |
Re: 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. | |
Re: 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 … | |
Re: 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` … | |
Re: 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. | |
Re: 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. | |
Re: `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 … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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, … | |
![]() | Re: 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. |
Re: 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. | |
Re: 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) ![]() | |
Re: You can refer the api provided in http://api.jqueryui.com/draggable/, add to your code $( "#window" ).draggable({ containment: "parent" }); | |
Re: 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 … | |
Re: 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 … | |
Re: 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"); }); | |
Re: 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);`  | |
Re: 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 … | |
Re: What you mean by 'How to Convert In to Xml File'? Show us what had you done until now and we can help you. ![]() | |
Re: @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. ![]() | |
Re: 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. | |
Re: 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. | |
Re: http://flexslider.woothemes.com/thumbnail-slider.html | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Your code should populate correctly, Just that I saw this line `while($row = mysql_fetch_array($state))` where `$state` is probably not defined. | |
Re: 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. | |
Re: 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()` | |
Re: 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. |
The End.