113 Posted Topics
Re: In the statement [iCODE]$data = mysql_real_escape_string (trim($date), $dbc);[/iCODE] remove the $dbc and try it. As in [iCODE]$data = mysql_real_escape_string (trim($date));[/iCODE]. I think you might not have initialized your connection before calling the statement. | |
Re: Should not be that difficult. Create a printer-friendly page using a table based layout. This can be done by either redirecting the user to another "Print" page or can be done using a popup window. Once the page has loaded, use the [iCODE]window.print()[/iCODE] javascript event to prompt for printing. Try … | |
Re: The session_start() requires that nothing should be outputted to the page before this statement is called. The easiest way to make sure that this is the case is to put the session_start() as the first statement on the page. | |
Re: You are using AJAX (The XHTTP request) to do this. An Ajax request require 2 files. A sending file which you have here. And a receiving file. The receiving file process the request and sends it back to the sending file to be handled. The below code should be part … | |
Re: Since you are using a date drop down and using PHP will it not be easier if use a for loop? Also you can check if the $MyDate==$year option and set the [B]selected='selected'[/B] statements. Check the code below. [CODE] <select name="DateDropDown"> <?php $myDate=$_GET['year']; for ($year=2010;$year>=2006;$year--){ if ($myDate==$year){ $s="selected='selected'"; } else{ … | |
Re: Rahul, We at Daniweb are looking to help you out based on effort you put in and not do the code for you. There are several sites available which will help you to create pdf's through PHP. Some of them are: [URL="http://www.tcpdf.org/"]http://www.tcpdf.org/[/URL] [URL="http://www.ros.co.nz/pdf/"]http://www.ros.co.nz/pdf/[/URL] [URL="http://www.fpdf.org/"]http://www.fpdf.org/[/URL] Try using the above to create … | |
Re: Hmm.. Are you using the statement [iCODE]mysql_num_rows($result)[/iCODE] anywhere in your code. As far as I have seen this error comes up when the sql statement being used for which you are getting the number of rows through the mysql_num_rows is incorrect. Is the error coming up for this code alone, … | |
Re: Are you using PHP? 'Cos there is no way our going to get the radio buttons appear on the screen without the echo statement. You code above is going to go into an infinite loop, provided of course you put in a loop statement in the first place. Also the … | |
Re: Are your ID's in the order as per the sequence of the Books, chapters and verses in the bible? If so, then you can pull the ID for from where you want to start and the ID till where you want to get the Scripture till and then pull all … | |
Re: It looks like your sql query has an error in it somewhere. I think the problem is with the [iCODE]$_POST[sid][/iCODE] not being encapsulated change it to [iCODE]{$_POST['sid']}[/iCODE]. It should work. If not then try this. Change the sql query to the following. [CODE]$sql = "SELECT take.StudentID,student.StudentName,take.CourseID,course.CourseName FROM take,student,course WHERE take.StudentID … | |
Re: I found several problems with your code. 1. The reason why the data is not being passed is that you should not have a space in the field names. Browsers encode it to be a + and so you cannot access it later. Covert this to an uderscore e.g. word_1, … | |
Re: Instead of using what madCoder has said use this. What the book has left out is the actual way of reading the checkboxes which is ironical. Add the following code in just after the [COLOR="Red"][B]<?[/B][/COLOR] in your Checkdemo.php file that would be at line 53. [CODE]$chkFries=$_GET['chkFries']; $chkSoda=$_GET['chkSoda']; $chkShake=$_GET['chkShake']; $chkKetchup=$_GET['chkKetchup'];[/CODE] This … | |
Re: Th answer to the question you ask depends on the way your website is structured. Do you have several pages or are the pages being dynamically created from a DB? Is your search algorithm returning the page_id's or the page names? If you can post the code as to where … | |
Re: Seriously, prince Awah, I do not mean to be rude. I have seen several of your posts and very few of the actually contain the code. You ask for stuff that is readily available on the net. We are always here to help you out if you get stuck provided … | |
Re: Start with writing down on paper what features you want to add into the social engine. You would be looking at profiles, friend systems, posts etc. Try creating the database first for this. One table for the users and passwords, one table for the member profiles, tables for the posts … | |
Re: Use [iCODE]scandir()[/iCODE] instead of the [iCODE]readdir()[/iCODE] to get the files to an array. Scandir() also has the capability of pulling the files in either ascending or descending order [iCODE]array scandir ( string $directory [, int $sorting_order = 0 ] )[/iCODE] Once you get the array, you can use the same … | |
Re: Where is iReport fetching the data from? mySQL? or another DB? | |
Re: Yes using AJAX is possible and I've done this before. Try the Javascript [iCODE]onunload()[/iCODE] event and link that to your AJAX. I've got it to work in the past. If you still have problems please let me know. | |
Re: There are 2 ways of doing this [B]Without PHP:[/B] You can use XML to store the paragraphs and then use javascript to include the required paragraphs into the div tag. Check out [URL="http://www.w3schools.com/Xml/xml_parser.asp"]http://www.w3schools.com/Xml/xml_parser.asp[/URL] for more information how this can be done. [B]With PHP:[/B] Us the PHP [ICODE]file()[/ICODE] function to pull … | |
Re: Have you started out with the code for the friends system project. Start writing the code and we can help you out with it. Here's a tip to start. Create a table for the friends. The format of the database could be one of 2 ways 1. The table would … | |
![]() | Re: @Alan: My suggestion is to start out with an overview of HTML first before you go into PHP since the whole purpose of PHP is Pre Hypertext Processing. This will form the base on which they can build. Also include the [B]for[/B] and [B]foreach[/B] loop rather than only the while. … |
Re: This is javascript alright. It looks like the creator of the script has encrypted it. This can be done with one of several available javascript encryptors online. If you're looking for a script for a specific function, let us know what the function if and we might be able to … | |
Re: The way you have the code set up, you are going to to keep adding to the bottom of the file. If you want to add the values in horizontally, you will need to pull out each line of the file (use the php [iCODE]file()[/iCODE] function into an array, add … | |
Re: Did you get what you are looking for? If you still have not it is quite possible that it is because your question is not clear. Which community page are you looking to find friends in? Do you have a community page created? We will help you if you are … | |
Re: There are 2 ways to do this. Through AJAX and PHP or through JavaScript. At [URL="http://www.plus2net.com/javascript_tutorial/dropdown-list.php"]http://www.plus2net.com/javascript_tutorial/dropdown-list.php[/URL] you can find the information to do both. All the best. | |
Re: @Windmill: If you're query has been resolved please mark the post as solved. Thanks. | |
Re: I'm not sure if you know this already but just in case you dont. To get the variable in the address bar into the page i.e., page use [iCODE]$page=$_GET['page'][/iCODE] This for your first example would return $page=21. Based on the variables you can echo what you need. Similarly for the … | |
Re: I'm still trying to figure out what you actually require. Please provide the following information 1. imagestring() puts the string [B]"ID:$id"[/B] in your example into the image. What is the value of [B]$id[/B] ? What does this have to do with the $str. 2. What is the value of $quote? … | |
Re: Is it required that you have to use Flash for this? 'Cos this can be done in pure PHP. Are you intending for the user to see a browser window in which the flash file is embedded or a flash executable file? | |
Re: You should not put the field names or table names in quotes. In SQL field names are variables not string literals. Only string literals should be put in quotes. So remove the quotes around the field names and the table name and it should work. [iCODE]$sql_overlay = sprintf("INSERT INTO overlay … | |
Re: [B]Session[/B] will work only if the user is using the same login window. If the user closes and reopens the window, the session variable will be reset. [B]Cookies[/B] would also be able to check the number of logins. However this would work only if the user is on the same … | |
Re: I really liked Digitarald's Fancy Upload for multiple images. You can get it at [URL="http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/"]http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/[/URL] | |
Re: You have not said which social engine script you are using? You have not posted where the potential problem lies. You have not given us a link to where you have uploaded the script so the we can see what could be wrong. You have not even told us what … | |
Re: Are you looking at using a secure (https) connection or an unsecure (http connection). From your example above it looks like you are trying to authenticate a user based on the url, username and password. Have you looked at using mod_rewrite in the .htaccess file? Check out the tutorial on … | |
Re: Here's the code. [CODE]<?php $dir = 'C:'; $files = scandir($dir); $j=0; for ($i=0;$i<count($files);$i++){ if (substr($files[$i],0,3)=="15_"){ $j++; } } echo $j; ?>[/CODE] This pulls all the files in the specified directory to an array and checks the array to see the stings starting with the required character i.e., "15_" and counts … ![]() | |
Re: To check if a string contains a specific character or set of characters in JavaScript use indexOf(). [B]Syntax:[/B][iCODE]string.indexOf(searchstring)[/iCODE] [B]Example:[/B][CODE]str="hello word"; if (str.indexOf("_")>0){ alert("Has underscore"); } else{ alert("Does not have underscore"); }[/CODE] The [I]str[/I] variable would take the data from the textbox. The indexOf() function returns to position of the character … | |
Re: The problem is that [B]"from"[/B] is a sql keyword. If you use a keyword as a column name, you need to encapsulate it. If you don't, sql will think you are asking for a query FROM a database. Here is the correct syntax. [iCODE]INSERT INTO contacts (`from`, `subject`, `message`) VALUES … | |
Re: Please let us know as to how you are pulling the value for the variable [B]$upload_Mime_Type[/B]. Will see if I can help you out. | |
Re: A button in Flash is a Symbol. It looks like you copied and pasted the symbol to get the 4 menus. In flash, an instance of a particular symbol is the same as the instance of every other Symbol. So if you change one of them, they all will. To … | |
Re: The problem with PHP is that the source is open. Anyone can change the code in order to bypass a licensing program. You should be able to encrypt your code. Refer to [URL="http://www.seocompany.ca/software/free-encryption-software.html"]http://www.seocompany.ca/software/free-encryption-software.html[/URL] in order to do that. Now to write a licensing program, you need to create a license … | |
Re: Try this... [CODE]<table border="1"> <tr><td>data</td><td> <select size="1" name="sel"> <option name="x">x</option> <option name="y">y</option> <option name="z">z</option> </select> </td><td>data</td></tr> </table> [/CODE] | |
Re: In order to use the image as a submit button, instead of using the <a href="..."> Use [iCODE]<input type="image" src="buttons/button_c.png" border="0" />[/iCODE] This way you do not require the javascript either. The form in whichever the image is in will be submitted. | |
Re: Try this. [CODE]$qty = $_POST['qty']; $unit = $_POST['unit']; $desc = $_POST['desc']; $query = "INSERT INTO detail (Quantity, Unit, Description) VALUES "; for ($i=0;$i<=sizeof($qty)-1;$i++){ $query = $query."({$qty[$i]},{$unit[$i]},$desc[$i]), "; } $query=substr($query,0,-2); echo $query;[/CODE] Please note the qty,units and desc would be array's coming in from the previous page. | |
Re: If you post values from a disabled textbox it will not get transfered over. In order to make the transfer there are 2 ways. 1. Enable the text box using javascript or 2. The easier method is to create a hidden text field and put the score in both places. … | |
Re: Please let me know how the table is set up so that I can help out with the code. Is the list in different rows in a table? Is the list in the same record? Are the elements in comma separated values? Such questions need to be answered before I … | |
Re: Create the textbox as follows [iCODE]<input type="text" name="choicetext"'+disa+' onfocus="check_choice()" style="display:none" id="txt">[/iCODE] And use [iCODE]document.getElementById("txt").style.display="block";[/iCODE] to show and [iCODE]document.getElementById("txt").style.display="none";[/iCODE] to hide. Put these in your respective JavaScript functions. | |
Re: Can you give us the listing of your form from which the field names are being populated? I would like to look at the fields in the form to correlate them with the fields in the php code to see what's wrong. | |
Re: echo the $sql statment and see if the variables $prodName, $writtenBy, $producedBy and $prodRating are being populated. If the sql statment comes out as it should then copy the statement directly into PHPmyAdmin and check if it works correctly. However, from your statement saying that the db is being poulated … | |
Re: You cannot get a progressbar directly from PHP. You need another language such as Perl or Flash. Digitarald has a really nice ajax upload script which you can use. It supports both single file and multifile uploads with progressbars. Access it here : [URL="http://digitarald.de/project/fancyupload/"]http://digitarald.de/project/fancyupload/[/URL] Let me know if you need … | |
Re: If you want a back button with an image on it, Use the following code [iCODE]<a href="javascript:history.go(-1)"><img src="img url here" alt="Go back" />Back</a>[/iCODE] |
The End.