113 Posted Topics
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] | |
Re: Do you intend to back the data up to a file or to another table? Inserting data into a table does not create a file. If you want to create a file you can use the PHP file functions [iCODE]$handle = fopen("backup.txt", "w");[/iCODE] and then write to the file. If … | |
Re: You have posted the entire code but not specified what problem you are facing. Please specify the problem, any error messages you are getting and at which locations. We should then be able to help. | |
Re: Make the following changes to the code [B]Line7:[/B] Encapsulate all the variables and correct the $$result[fruit_charges] the code would be [CODE]echo "<label> <input type='checkbox' name='fruit[]' value='{$result[fruit_id]}' id='Test_0' > {$result[fruit_name]} | {$result[fruit_charges]} </label> ";[/CODE] [B]Line 17:[/B] Add in the following line [CODE]$fruit=$_POST['fruit'];[/CODE] This would pick up the [I]fruit[/I] array from the … | |
Re: If I'm right, you are using Flash. Check if there is any script in the first frame of the movie. I know this sounds quite basic but I've made mistakes like this before and broke my head over it before finding that out. | |
Re: The registered users would be references in a table in the database. In the same table, a column should be created (name: [B]Login[/B])to store following values 1. When the user logs in using the login form update the table and set "logged in" status in login column for that user. … ![]() | |
Re: There is one major reason why your code is not working as it should. While pulling the $data into the for loop, you need to give a sizeof to set an upper bound for the loop. As a web designer, I would like to give you a few tips. [LIST=1] … | |
Re: You have not specified as to what backend your using. I'm assuming your using PHP (this is the PHP forum) and the data which the user is entering is being stored in a mySQL DB (or any other). There is a simple way to do this if this is the … | |
Re: I'm not going to give you the code directly but I'll tell you how to do it. 1. Assign an ID to each of the row elements. This should be fine if you already have a primary key in your table. 2. Normally you would be looping through each of … | |
Re: The problem is that your table is currently inside the while loop, this causes the table itself to get recreated. What you need to do is to place the <table> tags outside the loop. This would put each loop on a separate row. Here's the code [CODE] <?php // Query … | |
Re: Use this template... It should help.... [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; padding: 0; text-align: center; color: #000000; } .wrapper #container { … | |
Re: You dont need PHP for this. You can use javascript, css and layers. To show use [iCODE]document.getElementById("maintopright_tour").style.display="block";[/iCODE] To hide use [iCODE]document.getElementById("maintopright_cab").style.display="none";[/icode]. Show and hide the layer based on the click event. I believe I had previously implemented a version of what you are asking for one of the sites I … | |
Re: When you use a HTML form, all the input elements will be sent. What you can do is to pick out the ones you want. You can do this by naming the checkbox as an array [iCODE]echo "<input type=\"checkbox\" name =\"check[]\" id=\"check[]\" value=\"$uid\" Checked onClick=\"chooseOne(this);\">";[/iCODE] This would pull the values … | |
Re: In order to store images you have two options 1. Store the image directly in the database using a [I]blob[/I] datatype. For this there is a nice tutorial at [URL="http://www.phpriot.com/articles/images-in-mysql"]http://www.phpriot.com/articles/images-in-mysql[/URL]. 2. Store the image as a file in a folder and then store the link to the file in the … |