334 Posted Topics
Re: I modified your codes and it is working <form method="POST"> <table> <tr> <td><input name="input_servicos[0]" id="input_servicos[0]" type="checkbox" value="1" />Acolhimento</td> <td><input name="input_servicos[1]" id="input_servicos[1]" type="checkbox" value="1" />Atrium</td> <td><input name="input_servicos[2]" id="input_servicos[2]" type="checkbox" value="1" />Bar</td> </tr> </table> <input type="submit" name="submit" value="submit"/> </form> <?php if (isset($_POST['submit'])) { $input = array(); for($i = 0; $i < 36; … | |
Re: Don't quite understand what you are trying to do, but from what I see, the code for country works as the code: $(document).ready(function() { $(".country").change(function() { var id=$(this).val(); var dataString = 'id='+ id; $.ajax ({ type: "POST", url: "ajax_city.php", data: dataString, cache: false, success: function(html) { $(".city").html(html); } }); }); … | |
Re: Design your database with stock_id,stock_count fields, when the order placed, past the stock_id and use the query `update stock set stock = stock - 1 where stock_id = $stock_id` | |
Re: I think your show_cart_update.php probably is just return the array of results. What you need to do is `echo json_encode($your_result_array)` so that the data returned is in json format. ![]() | |
Re: You can probably use an ajax to call for another php to store the data instead of using the code `$query = mysql_query($sql);` in the <script> tag as this code will not having anything to do with the php function mysql_query(); ![]() | |
Re: Remove the code in line 12, which is `echo $row_users['username'];` and you shall get what you wish for. | |
Re: I not totally understand the question though but if I not mistaken, your problem is changing the string to variable name in php? If it is, it is posible to be done by refering [Click Here](http://php.net/manual/en/language.variables.variable.php) | |
Re: Please do google it there is plenty examples online. One of it is http://php.net/manual/en/function.date.php | |
Re: I don't know if my approach is appropriate to the condition, but normally what I done is I will put the filter just before data inserted to database. And redirect back to the form with error message code as indicator for display the error message. As for the processes of … | |
Re: Maybe try this UPDATE tb2 SET data = tbl1.data FROM tb1 as 'tbl1' WHERE tb2.id = tbl1.id I done this by refering http://stackoverflow.com/questions/4920394/how-to-update-data-in-one-table-from-corresponding-data-in-another-table-in-sql | |
Re: check your coding for $sql = 'CREATE TABLE Posts( ID INT(128) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Title CHAR(100), Author CHAR(100), Content CHAR(100), )'; should be $sql = 'CREATE TABLE Posts( ID INT(128) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Title CHAR(100), Author CHAR(100), Content CHAR(100) )'; Don't add comma at the last field | |
Re: This line of code `if(isset($_POST ['submit']))` check and run the script inside if only if the value of $_POST ['submit'] is set. But based on the current codes provided, there is no form posted the field value with name 'submit' to it. I think what you wish to is something … | |
Re: Modified a little of the codes to work: 1. supporting @Niloofar24's comment on line 18. 2. add in if-else condition to process only the form is posted else just display the form. 3. the comparism `if ($password == $result) {` is used before the query being executed. 4. the queried … | |
Re: mysql_query is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. Refer http://php.net/manual/en/function.mysql-query.php for alternatives | |
Re: Try use array_diff <?php $a1=array("2015","03","12"); $a2=array("2015","03","13"); $result=array_diff($a1,$a2); print_r($result); // returned Array ( [2] => 12 ) ?> while <?php $a1=array("2015","03","12"); $a2=array("2015","03","12"); $result=array_diff($a1,$a2); print_r($result); // returned Array ( ) ?> then we can use if(empty($result)) to check if the array is different. | |
Re: Actually your codes work fine. What you should do is to handle your reponse well. I ammend a little of your codes for testing. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('.button').click(function(){ var clickBtnValue = $(this).val(); var ajaxurl = 'ajax.php', data = {'action': clickBtnValue}; $.post(ajaxurl, data, function (response) { // Response … | |
Re: The problem is this line `$search = $_POST['searchvalue']; ` where the link you click did not 'post' data. What you can do is to either made the 'link' become 'post' or you can include the search terms into the url and use the 'GET' instead of 'POST' | |
Re: First of all, supporting @diafol's comment on the 'proper indenting' issue. Proper indenting easier the job for us. Then the problem in this program: 1. The <select> and the looping for its <options> is outside the <form> tag where it is imposible for the selection to be 'post' to $_SERVER['PHP_SELF']. … | |
Re: The action is not a mandatory as if it is not set, the form will just post to same file. The problem here mostly is about the part VALUES ('$username', '$password')"; where these 2 variables is not set to anything yet. Perhaps adding these lines before the query will help. … | |
Re: After instalation, there will be a xampp control panel, the Apache should be started before localhost can be accessed. | |
Re: Support @OsaMasw's comment, "simply put jquery code for slider inside your page" and change the image to the directory your image are. But, please do understand that by using php loop, the url for the image can be changed accordingly with code but if you hardcoded the image url to … ![]() | |
Re: you can try to use define() if (defined($_SESSION['banner'])) { echo $_SESSION['banner']; }else{ echo "$_SESSION['banner'] not defined"; } | |
Re: I think what you wish to achieve is not posible without a little help of CSS + javascript. With the help of those 2, you can probably show all and add/remove a 'hidden' css class to the div containing submenu while the hidden css class will having the CSS styling … | |
Re: put the left sidebar before the section and assign a 'float:left' to its css style will do. | |
Re: if($image_width > $data2['maxwidth'] or $image_height > $data2['maxheight']) shouldn't this be like if($image_width > $data2['maxwidth'] || $image_height > $data2['maxheight']) | |
Re: We are not going to provide code for you to get your task done. What we do, we can only give guidance Tables you should create and the fields needed: course_attendance present course_id week_id student_id students student_id courses course_id attendance week_number_id I am sure you can googling for 'php mysql … | |
Re: If I am in the case, I will do like: foreach ($banner_image as $key => $each_banner_image) { // use your $each_banner_image['image'] here } | |
Re: So, the image field in database is correct if you update other fields without updating image field? If not, maybe as you update other field, the file input type is empty and you probably update the database to empty. | |
Re: Please do try googling around. There are plenty of suggestions/solutions provided online. Anyway, you can refer this links http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php | |
Re: Try this: $query_one = "SELECT * FROM 'users' WHERE 'username' = '".$username."' AND 'password' = '".$password."'"; | |
Re: This problem is actually cause by the data is not in correct format. As the data provided is in {features: {forecast10day: 1 }} format while the json decode function accept {"features": {"forecast10day": 1}} | |
Re: Wish to double confirm if the post is ask for development language, platform, or software? Wouldn't the software use depends on the platform and programming language? As far as I know, microsoft word also having a function of generating html. | |
Re: If I am in the case, I will use htmlentities to encode the text before having it store to database and when query out the data, decode it with html_entity_decode(). Detail on how to use the functions will be on http://php.net/manual/en/function.htmlentities.php | |
Re: apparently this code is messing around: $("#list").remove($(this).attr('id')); According to http://api.jquery.com/remove/ .remove() will remove the whole dom element with the selector. In order to unset the id, I will use .attr('id',''); to set the id to empty. | |
Re: Can I have a link to page? maybe I can understand the problem better if you provide one. | |
Good day, I wish to print out the content of the files uploaded by the user from a input file type. It is passed to backend using post method. I have done some research but unforturnately I still haven't found a solution that satisfy me. The answer that are close … | |
Re: In my opinion, you should put your div with class="shadowblockmenu-v" to the top in body and set its css to float:left;. Then a value of margin-right and bottom will made it look good. Moreover, if you wish the content will not go below the nav bar, then you have to … | |
Re: Actually that will be the part of responsive design. If you done everything then it should be look fine in any size all depend on how you style them. You may need a few media queries to achieve different view from different size. For example, viewing the site from ipad/iphone … | |
Re: why don't you just post the link here and people can help you faster. | |
Re: @godslove I tried using your codes by replacing header() with a basic echo statement, and it work fine. | |
Re: How about using an iframe sourced to where you store your PDF file? | |
Re: Based on my opinion, the main problem is not in the menu wrap. It should be the container of it. Maybe the its container is set to a fixed width. | |
Re: Have you double check the link structure? It should be something similar to this: <a class="logo" href="http://www.google.com"><img src="logo.png"/></a> | |
Re: no comma between index.html and index.php | |
Re: In my opinion, instead of establishing db connection, why don't you try to use cache to set the time. What I mean is use php to establish a cache which will expire in a certain time. Then, use the login function to assign the cache data. If the data is … | |
Re: I think the main problem is that the content is long enough and there will be a white space below the footer. Normally we have our footer div set to absolute position and bottom:0 in the case. | |
Re: set your #menu with position: relative and z-index:999; that will solve your problem. | |
Re: 1. what you need to do is to confirm if you have the remote access to the server. 2. the payment is actually depends on the service provider, some provide free hosting and other charge. 3. if the forum site is uploaded, the content is basically viewable by everyone provided … ![]() | |
Re: Just want to know a few information, where is the location, how many page you want(normally my designed site consist of 4: home page, about us, product/service, contact us)? already having hosting plan?. If you are interested, you can probably email to me at lauodd@gmail.com. The cost is negotiable |
The End.