- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 25
- Posts with Upvotes
- 22
- Upvoting Members
- 18
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Working as a Consultant for IT. Do projects in PHP for fun. Just bought an Android based phone and learning the Android SDK.
- Interests
- Collecting Paper Napkins, Computer Gaming, Reading Novels.
- PC Specs
- Windows Vista
113 Posted Topics
Re: Please let me know if you have already solved the problem. If I understand your problem correctly, you have a list of Cigars which you want people to rate. When a user clicks on a cigar name, he is taken to another page to rate the cigar on different parameters. … | |
Re: Ok... I'm going to try and help you out even though I'm not sure if my answer is not specific enough for you. I tried out your code and it worked fine. There is one thing I would like you to check. Have you added in the [iCODE]enctype="multipart/form-data"[/iCODE] in your … | |
Re: This project is not difficult to do. Here are a few tips to get you started. 1. Start out by creating a table with the unique_id, the question, the four options, the question type (Drop Down or MCQ) and the correct answer. 2. Decide on whether the questions will be … | |
Re: The SMS API should normally allow sending to multiple recipients by using a comma(,) between the recipient numbers e.g., [CODE]http://www.abulksms.com/pushsms.php?...=your_password&sender=mysenderid&cdmasender=mycdmasenderid&to=[COLOR="red"]myrecipient1,myrecipent2,myrecipient3[/COLOR]&message=Hello [/CODE] If not then you would probably need to use a while loop to send the messages individually. However, try and see if the SMS API has a POST method. … | |
Re: What course are you undergoing? | |
Re: Just windering if you got this problem fixed... If not. I'll check it. Although at first glance, I do see a problem with the code at the statement [iCODE]if ($num_rows = 0)[/iCODE] This should be [iCODE]if ($num_rows == 0)[/iCODE] You will have to use a double == to compare rather … | |
Re: Do you have a system for users to login. That way you can make sure that only one user can vote once for a post, just like what[B] vibhadevit [/B]says.In addition to the user_id and post_id, also put in the +1 or -1 which you can then use to calculate … | |
Re: Don't you need a [iCODE]$sort=$_GET['sort'];[/iCODE] somewhere. If that statement of code is not included $sort will never be set before the [iCODE]if (!isset($sort))[/iCODE] statement and the table will only sort based on the default value. | |
Re: In answer to your questions 1. If you are using one sql statement to make the update then the efficiency should be the same no matter how many fields are getting updated. It all depends on the number of sql calls you are making to the database. If you are … ![]() | |
Re: That would depend on if you are using the same folder to store all your uploaded files in. If the path is going to remain permanent then, it would be sufficient to store just the filename in the DB. If the folders are different then you would need to store … | |
Re: I'm pretty sure you can find this code on the internet. The purpose of the DaniWeb Forum is to help people who are stuck with a programming problem and are not able to solve it. Try solving this problem yourself and if you get stuck, we are here to help … | |
Re: I suppose you have some kind of a database where you are storing your articles or are you storing your articles as html files in folders? The answer to your question depends on the structure you are using to arrange your articles. For e.g, if you are using a database … | |
Re: Please note, that we do not just "[B]Give the solution[/B]" here. We try and help you find it for yourself. For what you are trying to do, are you using 2 different pages to show the different members, or are you using the same page with ID increments to show … | |
Re: The URL's used are called search engine friendly urls and are made using a redirect from the .htaccess file. Check out [URL="http://www.edinteractive.co.uk/article/?id=48"]http://www.edinteractive.co.uk/article/?id=48[/URL] for more information. | |
Re: You could also use AutoIt's IE UDF to do it as well. However, this is a PHP forum. Are you looking for a PHP specific method? ![]() | |
Re: file_get_contents can be used to get the contents of a url into a PHP variable. Check out [URL="http://www.howtogeek.com/howto/programming/php-get-the-contents-of-a-web-page-rss-feed-or-xml-file-into-a-string-variable/"]http://www.howtogeek.com/howto/programming/php-get-the-contents-of-a-web-page-rss-feed-or-xml-file-into-a-string-variable/[/URL] for more details. | |
Re: Instead of using buttons, I suggest you use links, it will make your work simpler. Take a look at the code below... [CODE]echo "<tr>"; echo "<td>" . $whilesitename . "</td>"; echo "<td>" . $whilesiteaddress . "</td>"; echo "<td>" . $whilerateyes . "</td>"; echo "<td>" . $whilerateno . "</td>"; echo "<td>" … | |
Re: I really like chrishea's answer. Try out the problem yourself. I know the answer to this question as soon as I saw the problem since I have seen this problem before and solved it myself. That is how you develop a good head for logic and programming skills, not by … | |
Re: Get the user to type the name of the file in a text box and get that into the $myFile variable using [iCODE]$myFile=$_GET['[COLOR="Red"]<textbox_name>[/COLOR]'][/iCODE]. Check if the file exists on the server and delete it. [CODE]if (file_exists("users/".$myFile)){ unlink("users/".$myFile); } else { echo "The file does not exists"; }[/CODE] However, it is … | |
![]() | Re: The <iframe> is not a form element so you will not be able to transfer data from an Iframe through a $_POST or $_GET via the url. You will most probably have to use a <textarea> which is a form element in order to transfer data. If you have to … ![]() |
Re: Instead of creating a search engine, why don't you use [URL="http://www.google.com/cse/"]Google's Custom Site Search[/URL]. It's configurable and its free. | |
Re: Do you have to make your code so complex? From the code, I see that the output of the page would be whatever is in the [B]prop_saletype[/B] field of the [B]first row[/B] of your [B]property_details[/B] table. Please let me know what output you intend to see and I should be … | |
Re: Checkboxes works like this. A Checkbox, is assigned a [B]name[/B] and a [B]value[/B]. When you send checkbox data to a php page, the url would show [B]name=value[/B] as part of the url. For a checkbox, the name is required while the value is optional. Let's look at this in cases. … | |
Re: Just after the while loop i.e., Line 13 in your previous post, add the following statement [CODE]mysql_data_seek ($resComp, 0);[/CODE] It should fix the problem. What I believe is happening, is when you make a call to get the value from the $resComp, the internal pointer moves forward, so the next … | |
Re: Instead of opening the image on another page, I suggest you use a Lightbox. Check out [URL="http://www.huddletogether.com/projects/lightbox/"]http://www.huddletogether.com/projects/lightbox/[/URL]. It looks much better and avoids those pop-up blockers. If you still want to know how to open a new window with the larger image, post back and I'll show you. However, till … | |
Re: A standard way to do it would be [CODE]while ($empname=mysql_fetch_array($result)){ echo $empname['emp_name']; }[/CODE] or if you want it as an array you could always [CODE] $empArray = array(); while ($empname=mysql_fetch_array($result)){ $empArray[]=$empname['empname']; }[/CODE] | |
Re: Try [CODE]@mkdir("C:\\wamp\\www\\uma\\member media\\member tracks\\".$memberid) or die(mysql_error());[/CODE] [B]On Edit:[/B] Javvy's right... You do need the double backslash. This is because a single backslash(\) is an escape character. | |
Re: Isn't it list way easier to use a TIMESTAMP Datatype and then use mySQL's ON UPDATE CURRENT_TIMESTAMP clause. [B]I'm pretty sure this could have been got from google. [/B] | |
Re: That's because you are using a singe "=" operator which is an assign operator rather than a double "==" operator which is an equivalent operator. Change your [B]if statements[/B] to [CODE]if($row['service']=='AM' && $row['award']=='Winner') {[/CODE] and [CODE]if($row['service']=='AM' && $row['award']=='Notables' || $row['award']=='Honorable Mentions' ) {[/CODE] then, it should work fine. | |
Re: Your question is not very clear. Could you please clarify if you want to get the data into a JavaScript variable or a PHP variable. Thanks. | |
Re: Just curious... Did you put [iCODE]var discuss_text = $('#discuss_text_<?php echo $row['id']; ?>').attr('value');[/iCODE] directly into the <script> section of the document or did you do this [CODE]<?php include('insert.php'); $test=mysql_query("SELECT*FROM wall ORDER BY id DESC"); while($row=mysql_fetch_array($test)){ echo "<textarea id='discuss_text_{$row['id']}' name='discuss_text'></textarea>"; } ?>[/CODE] Cos you need to put in the $row['id'] from somewhere … | |
Re: If you are planning on using the system at a local level i.e, within a shop rather than across stores, you do [B]not[/B] require to have access to the internet to store the files. Consider a store that has multiple counters with a computer at each of the checkout counters. … | |
Re: Did you get the answer you were searching for? If not, then please answer the following questions.. 1. Do you want the change to be made just to the checkbox or should any changes be made to the Database? 2. I see you have an update button. Are you getting … ![]() | |
Re: Try this... [URL="http://roshanbh.com.np/2007/12/change-dropdown-list-options-values-from-database-with-ajax-and-php.html"]http://roshanbh.com.np/2007/12/change-dropdown-list-options-values-from-database-with-ajax-and-php.html[/URL] I'm pretty sure you could have found it as well. If there is anything you are stuck with please let us know and we'll help you out. | |
Re: There are several free webhosting servers available where you can run your PHP code. Check out [URL="http://www.free-webhosts.com/free-php-webhosting.php"]http://www.free-webhosts.com/free-php-webhosting.php[/URL] for a list of servers with free PHP hosting. Create an account in one of them and you should be able to upload the code through the CMS Panel they provide. All the … | |
Re: Yes, it is possible. But not through PHP. You will need to use JavaScript for this. Check out the forum at [URL="http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript"]http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript[/URL] for how you can do this. | |
Re: In order to store multiple selections, you can send the data as an array. In your case use the name of the select box as [COLOR="Green"]servicearea[][/COLOR] instead of [COLOR="Red"]servicearea[/COLOR]. When you use the [iCODE]$servicearea=$_GET['servicearea'];[/iCODE] in the PHP code, the [B]$servicearea[/B] variable becomes an array with all the selected values. You … | |
Re: You need to give the name of the db you intend to use in this function [CODE]mysql_select_db('[COLOR="Red"]<db_name>[/COLOR]')[/CODE] If you are, then check if you are connecting to the mysql server using mysql_connect correctly. | |
Re: I believe [B]kishanillur[/B] is in India. I tried what [B]chrishea[/B] said but was not able to get it to work. I have implemented a SMS system in one of my other sites, unfortunately for us, we do not have a free SMS gateway. There are several paid SMS gateways though … | |
Re: Just wondering... If you require the config on every page, is'nt it easier to use a SESSION variable? If you have to pass it through a form, then you would be possibly having a hidden element. change it to text and see of it is taking the config value correctly, … | |
Re: There is a way of doing this, but its not exactly like your Pseudo code. But it can be done dynamically. Make the array's you want to display and array of arrays. [CODE]var data= [ ['c1',11,12,13,14,15], ['c2',21,22,23,24,25], ['c3',31,32,33,34,35] ];[/CODE] The first elements c1,c2,c3 etc should be the names of the … | |
Re: When you submit your form, your $featurex variable, will be an array of the values depending on which checkbox is selected. If all are selected the array will be [COLOR="Green"]$featurex[0]="walkincloset"; $featurex[1]="storage"; $featurex[2]="availability";[/COLOR] or if just walkincloset and availability are selected then the array would hold [COLOR="green"]$featurex[0]="walkincloset"; $featurex[1]="storage";[/COLOR] You can create … | |
Re: For this you would need to create 2 different forms to submit the data you need to. Create a button outside the forms and submit the required one using JavaScript. That's the concept behind it. If you cant figure out the code to execute it, please do let us know. | |
Re: Adding on to Jim's reply, you would also need to calculate the (current time - time stored in session). This would give you the amount of time that the user has been playing. Deduct that from the total time to get the time remaining before the timer reaches 0. | |
Re: When you push through an AJAX request, all the variables can be sent through the querystring, you can send multiple variables using ampersand(&). In you case [CODE]xmlhttp.open("GET","tablebase.php?q="+str+"&q2="+str2,true);[/CODE] where str2 would hold the data you need to send to q2. | |
Re: When you say breaking, can you please explain as to what is happening? Are you not getting the values into the DB? or is something else wrong. I have not tried out your code yet, but there are a few things that you should change to check this. 1. When … | |
Re: If you are looking at how the numbers at the side appear, Its done through Javascript. Although this is a PHP forum, I'll explain how you can do this yourself via Javascript. Each of the drop down menus are linked to a JavasScript function [iCODE]calculate()[/iCODE] as you can see in … | |
Re: Cannot help you out unless we see what you made a mistake in your code. Does your publications DB have a primary key or are you updating the DB with something like [iCODE]UPDATE table SET x='x' WHERE user_id=''[/iCODE]. This would update all the entries. Try putting in a query like … | |
Re: Th easiest way is to write it on your own... ...or download it from the internet. Try [URL="http://www.shop-script.com/scripts/shop-script-free.html"]http://www.shop-script.com/scripts/shop-script-free.html[/URL]. It has most of the functions you require if not more. | |
Re: The issue you are facing, is that checkboxes only transfer the values when they are checked. For e.g., in the case you have above, your for loop only goes one look where $size takes the value of 1 in view.php but the $access has a array length of 4 and … |
The End.