39,316 Topics
| |
i want to set a default value of option box and that value is fetch from database. here is my code it works fine with number but my month are given in alphabetical order like "Jan","Feb".. here is the code I try <?php $month=array("Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"); foreach($month as $m) { printf('<option value="%d"%s>%d</option>', … | |
i am stuck at one problem where i have two radio buttons "yes" and "no" by default yes is checked and below these radio buttons there are 3 drop downs for country,state,cities and two text fields.no what i want is when user select "no" radio button all these 3 dropdowns … | |
Does php copy() function can convert a certain file format, let say for example file.pptx convert to file.odp, is it possible? | |
Hi, here I included my code to find no of working days between two years. But in leap year I do not know how to find the working days. Can anyone help me? function calculate($month,$year) { $Start_Date="1/".$month."/".$year.""; $myTime = strtotime($Start_Date); // Use whatever date format you want $daysInMonth = cal_days_in_month(CAL_GREGORIAN, … | |
hi im attempting to add a multiple checkbox with a few options see html code <form method="post"> <table width="900"> <tbody> <tr> <td width="900"><input name="interests[]" id="option1" value="option1" type="checkbox">option1</td> <td width="900"><input name="interests[]" id="option2" value="option2" type="checkbox">option2</td> <td width="900"><input name="interests[]" id="option3" value="option3" type="checkbox">option3</td> </tr> <tr> <td><input name="interests[]" id="option4" value="option4" type="checkbox">option4</td> <td><input name="interests[]" id="option5" value="option5" … | |
Hello i want to retrieve only one row from an mysqli statement. The catch is that i use the `$row=mysqli_fetch_array` in a `while()` to loop the data. But i need a row to run as variable before the while begins This is what i mean $query=mysqli_query($db,"SELECT a_id,a_title,a_desc,a_url,a_img,a_uid,a_times FROM table WHERE … | |
how to send mails individually instead of sending to all recipients together? my code is: function SendMail($msg,$subject,$addresses) { require "class.phpmailer.php"; //Fetch from email here foreach($addresses as $key=>$val){ $email = test_input($val); if((trim($email)=='') || (!filter_var($email, FILTER_VALIDATE_EMAIL))){ unset($addresses[$key]); } } $addresses=array_unique($addresses); $row = FetchAllsettingsCustomMailchmp(); //end fetch $mail = new PHPMailer(); $mail->PluginDir = ""; … | |
I try to upload a .pptx file to my server folder named "lesson" and copy that file from the same folder and rename that copied file with .odp extension. I used ViewerJS plugin and it really work nicely when i open a pdf file. However. my problem is that when … | |
Hello, i have a problem. I want to do two things First, explode an array to retrieve the ids from a row on the table e.g. 1,5,23 and then use a variable to call a Mysql statement. Here is my code public function Show($times) { $q=mysqli_query($this->db,"SELECT to_uid_fk FROM table WHERE … | |
There´s another post about this, over 3 months old, but there they are dealing with port settings which isn´t the problem, so I´m making a new thread. I send out 50+ emails in a loop via PHPMailer - SMTP. For testing purposes I send them all to myself, so I … | |
Hi, I'm Kavin, I guess I've always been a bit geeky. I'm currently working on my first website and learning HTML and CSS. I'm also quite keen on photoshop. I also want to learn PHP, MySQL and video editing at some point, but for now I'm still quite busy with … | |
Hi, I am new to this concept. Can anyone give me an example and ideas for google map plotting? In a google map, I want to show all the trucks based on latitude and longitude of the trucks. After showing all the trucks,I want to see a particular truck`s report … | |
Hi all, I'm very very new when it comes to JavaScript, but I understand it's what I need to solve my problem. Basically, I have a PHP script that takes a while to process (several minutes). This script is linked from my homepage and when the script finishes it redirects … | |
I am thinking about installing an SSL cert on one of my domains but only want to use it on a few specific pages where people enter their personal information. Before I purchase the wildcard SSL and install it, I wondered if anyone could point out any pitfalls to be … | |
The php/html file I am working on is laid out in this way. <?php // connect to DB $connection ?> html html html <?php foreach($connection-query($sql) as $row) do stuff ?> I'm getting the error 'Invalid argument supplied for foreach()' when I run this page. Can I not break out of … | |
SO im trying to generate and 8 x 8 table while($a <= 8) { echo "<tr>"; while($b <= 8) { echo "<td> tell me </td>"; $b++; } echo "</tr>"; $a++; } and i cant tell whats wrong | |
Hi, Im working on project right now in webdevelopment. im trying to view a PDF file in a browser which is the filepath was stored in database and the actual file save was in folder inside my webfolder and could retrieve/view by its ID. here's some of my code <?php … | |
Always get really confused when dealing with timezones... I have a string `8/11/2013`, which I apply the following code: $firstDate = new DateTime($rawData[$backdate][0]); $firstDate = $firstDate->format('d/m/Y'); The issue is that PHP seems to think that the '11' is the day, when it's actually the month (I'm in NZ). When I … | |
I know how to find number of working days for an academic year. But I want to know working days of each and every month from june to april of next year,seperately. How to do? | |
Hi I have problem to get data when insert with ajax. I have ajax.js file and here is this code: $('#text-content').keypress(function(e){ if(e.which == 13) { if($('input#enter-click').prop('checked', true)) { $('#live-send').click(); e.preventDefault(); } } }); $('#live-send').click(function(){ var message = $.trim( $('#text-content').val() ); if($('#text-content').val()!="") { $.ajax({ type: 'POST', dataType: "json", url: './includes/conversation.php', data: … | |
HI, I want to calculate number of working days for the academic year between two dates like(01-06-2015 to 31-10-2015). I saw all codes that are doing only for curtrent year. If I want to do future years , how to do automatically, Here is my code what I tried , … | |
Hello, I tried to integrate api of aylien which is used for article extraction I installed the sk succesffuly but when I tried to run my code it gives me an error Trying to get property of non-object in C:\wamp\www\aylien\index.php on line 15 Notice: Trying to get property of non-object … | |
Hi all, quite a strange problem here. I have a csv file with rows: 20/12/2011 4.75 4.75 4.53 4.55 94.74 432.98 4.57 21/12/2011 4.38 4.38 4.38 4.38 20.9 91.54 4.38 22/12/2011 4.19 4.19 4.17 4.17 8.54 35.71 4.18 23/12/2011 3.86 4.35 3.84 4.22 149.49 625.81 4.19 24/12/2011 4.33 4.33 4.33 … | |
How do one enable a search button in PHP to function in terms of when I do a search on the website, my search goes through and I get the feedback of what I was looking for. | |
Hi all, I am trying to insert 1000 above data into a table but after inserting 500 something data its showing an "Internal Server Error". I tried after changing max_execution_time in php.ini and some other methods but no use. But this works fine in localhost. Given below is my code. … | |
Hi all, I'm working with a function that only accepts values between 0 and 1, so I need to scale my data first. The first part involved in this is calculating the high/low values of my inputs. I pass this into a function that churns out X and Y values … | |
Hi all, I have an array $pTimeseries with 365 items inside it. I use a simple for statement, as below: //Add TimeStamp to Historic Data for($i = 0; $i < (count($pTimeseries)); $i++) { $pTimeseries[$i][1] = $rawData[$i + $backdate][0]; } In my Apache error logs I get "Undefined offset: 366" all … | |
Hi I have a running website which is based on ASP.NET Now I want to convert the full webiste in PHP. The current website is based on DotNetNuke and also modified some modules. Please provide your help to how to do this ? Thank you. | |
Hi I have problem to get data when insert with ajax. I have ajax.js file and here is this code: $('#text-content').keypress(function(e){ if(e.which == 13) { if($('input#enter-click').prop('checked', true)) { $('#live-send').click(); e.preventDefault(); } } }); $('#live-send').click(function(){ var message = $.trim( $('#text-content').val() ); if($('#text-content').val()!="") { $.ajax({ type: 'POST', dataType: "json", url: './includes/conversation.php', data: … | |
I want to use the instance of ckeditor. when user click on add more button it will create the instance of ckeditor, but that instance of ckeditor is not editable. I mean user is not able to enter anything there. Need help...Thanks in advance :) fiddle : http://jsfiddle.net/pkz7auLy/ |
The End.