113 Posted Topics

Member Avatar for Masks.be

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.

Member Avatar for sudeepjd
0
61
Member Avatar for anita_86

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 …

Member Avatar for anita_86
0
86
Member Avatar for chandaboy

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.

Member Avatar for Plyswthsqurles
0
108
Member Avatar for waniejjang

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 …

Member Avatar for waniejjang
0
4K
Member Avatar for daviddoria

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{ …

Member Avatar for daviddoria
0
7K
Member Avatar for rahulb310

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 …

Member Avatar for sudeepjd
0
105
Member Avatar for ivanwafoo

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, …

Member Avatar for sudeepjd
0
318
Member Avatar for vidhyajeyaraman

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 …

Member Avatar for sudeepjd
0
729
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
369
Member Avatar for mtvaran

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 …

Member Avatar for mtvaran
0
123
Member Avatar for zlloyd1

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, …

Member Avatar for sudeepjd
0
172
Member Avatar for shoucate

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 …

Member Avatar for shoucate
0
108
Member Avatar for NutanGadakh

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 …

Member Avatar for NutanGadakh
0
142
Member Avatar for Awah Mohamed

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 …

Member Avatar for Awah Mohamed
-2
145
Member Avatar for Awah Mohamed

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 …

Member Avatar for Awah Mohamed
0
200
Member Avatar for 84hd0ns

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 …

Member Avatar for 84hd0ns
0
168
Member Avatar for srdva59
Member Avatar for georgeee123

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.

Member Avatar for georgeee123
0
416
Member Avatar for Waffles007

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 …

Member Avatar for Waffles007
0
3K
Member Avatar for vizz

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 …

Member Avatar for sudeepjd
0
375
Member Avatar for diafol

@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. …

Member Avatar for sudeepjd
0
141
Member Avatar for arctushar

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 …

Member Avatar for arctushar
0
76
Member Avatar for bbman

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 …

Member Avatar for sudeepjd
0
1K
Member Avatar for fredrickprem

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 …

Member Avatar for sudeepjd
0
71
Member Avatar for mtvaran

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.

Member Avatar for sudeepjd
0
111
Member Avatar for windmill87
Re: PHP

@Windmill: If you're query has been resolved please mark the post as solved. Thanks.

Member Avatar for sudeepjd
0
167
Member Avatar for MoreBloodWine

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 …

Member Avatar for MoreBloodWine
0
145
Member Avatar for BaSk

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? …

Member Avatar for sudeepjd
0
91
Member Avatar for arctushar

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?

Member Avatar for sudeepjd
0
75
Member Avatar for theG-Scott

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 …

Member Avatar for theG-Scott
0
152
Member Avatar for h0neydip

[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 …

Member Avatar for sudeepjd
0
467
Member Avatar for niths

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]

Member Avatar for Cool&Awesome
0
120
Member Avatar for prabhakarn

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 …

Member Avatar for prabhakarn
0
101
Member Avatar for DealthRune

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 …

Member Avatar for sudeepjd
0
65
Member Avatar for Sorcher

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 …

Member Avatar for diafol
0
59
Member Avatar for powerteens001

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 …

Member Avatar for Taywin
0
225
Member Avatar for Awah Mohamed

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 …

Member Avatar for sudeepjd
0
113
Member Avatar for somakumaran

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.

Member Avatar for sudeepjd
0
93
Member Avatar for alanlee9898

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 …

Member Avatar for alanlee9898
0
166
Member Avatar for an00p

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 …

Member Avatar for chrishea
0
1K
Member Avatar for sravi.pearl

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]

Member Avatar for sudeepjd
0
68
Member Avatar for sakush100

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.

Member Avatar for sudeepjd
0
138
Member Avatar for danswater

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.

Member Avatar for danswater
0
134
Member Avatar for miss_indie

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. …

Member Avatar for sudeepjd
0
105
Member Avatar for Aydot22

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 …

Member Avatar for sudeepjd
-1
109
Member Avatar for niths

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.

Member Avatar for sudeepjd
0
128
Member Avatar for ebanbury

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.

Member Avatar for ebanbury
0
203
Member Avatar for toocoded

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 …

Member Avatar for toocoded
0
86
Member Avatar for ivan3510

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 …

Member Avatar for ivan3510
0
187
Member Avatar for Matthew N.

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]

Member Avatar for Matthew N.
0
103

The End.