Creating List Box Using Fields On My Db
Is there a way to add to this by using infomation on my table. Basically my table will have price and type and i want to add those 2 in the list so that it will look like this:
£12,000 - Steel
£12,500 - Wood
And because its a list box the user can then click which ever one and then i can submit it using a form ? ( i can do the form bit) but i cannot do the bit where by it creates the list in the box.. this is the html of the box so far: Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Can I Get List Of POST Fields In A Second Page?
I have a form on a page that is built on results from a db query. The user can tick boxes/edit fields etc, and then submit to a second page that will update the db. How do I know what my POST fields are and how many in the second page (I am naming my fields in the form on the first by being a common name with a unique ID from each record on the front, ie. each record has a id_name, id_email etc etc.
Creating A List Of Numbers (143-160, 172-181 Etc)
I have a list of ID's that I would like to compile a easy to read list of ID's. Instead of listing out the numbers like 143,144,145,146,147,148,..... I would like a easy to read list of the ID's grouped together like below. Does anyone have any suggestions?
Creating A Live/logged On List
Is it possible to determine the currently logged on users? I have a login section of my site that is controlled by sessions and would like to display a list of the currently logged on users. I did think of creating a 'live' table storing userids and adding/deleting when they login/logout. Logging in is ok, but how do you maintain the list if they just close down without letting me call the relevant unregister session functions?
Creating A Linked List Of Wmvs
I have a place to ftp wmv's I need some sort of script that will basically just list the filenames of the content of the folder, and the ability to make them links as so you click and the wmplayer opens the files. i'm going for simplicity here, i tried using ftp via a weblink, only problem there is to get permissions to where they need to be you'd have to chmod all day. back n forth. i've seen these before, I'm trying to avoid turning it into an automated system via forms and sql.
Creating A Product List Page!!!!
I was able to retrieve information from the database but I get an error message that says "Notice: Undefined variable: SubCatID " and I can`t get my list to display right. I wanted my SmallIMG to be on the right and my and my ProductName to appear right beside it along with the UnitPrice. Kinda like straight across because I want it to be a link to the individual product page. If I can get help on this part, I can get started on my shopping cart. Code:
Creating Simple Unordered List Menu From XML?
Does anyone have any examples or links to examples of generating a simple unordered list menu with multiple levels from an XML file? We are redesigning the navigation on our website and I was hoping to make this as flexible as possible.
List Contents Of A Folder, Make List Of Links
Does anyone know how I can write a script that: - reads in all the files in a particular directory - displays the file names in a html list and makes a link of them: <ul> <li><a href="filelocation1">filename 1</li> <li><a href="filelocation2">filename 1</li> <li><a href="filelocation3">filename 1</li> </ul> etc.? So basically it creates a list of links with the contents in that directory, so you can download them from there.
Get List Of Messages From One Table, Message List Indicator From
I have two tables. One has a list of messages left by users using fields named mbxno for the mailbox and msgno for the message number. I have another table that has mailbox settings for each user that contains a field named "messagelist" to indicate if they want to be included on the message list or not. What I'm trying to create is a list of the most-recent messages with a lookup on the users table to indicate whether a message in the list should be included in the message list based on the user's mailbox settings. SELECT messages.msgno, messages.mbxno, users.messagelist FROM messages, users WHERE (users.messagelist = Ƈ') ORDER BY msgno DESC LIMIT 100 What I'm getting, though is a list that looks like this: mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 1114 msgno: 0412141623 msglist: 1 I think what's happening is that I'm using the wrong type of join and more rows are being created than necessary. If I add "DISTINCT" to the query, I get a list of the most-recent messages as I expect, but the "messsagelist" value is sometimes wrong (again, probably because the data is getting jumbled). For example, the messagelist value for the second row (2214) should be 0, not 1. mbxno: 1114 msgno: 0412141623 msglist: 1 mbxno: 2214 msgno: 0412141622 msglist: 1 mbxno: 2189 msgno: 0412141408 msglist: 1 mbxno: 0000 msgno: 0412141213 msglist: 1 mbxno: 0003 msgno: 0412141213 msglist: 1 mbxno: 2265 msgno: 0412132029 msglist: 1 mbxno: 0000 msgno: 0412131950 msglist: 1 How should I be doing this? If nothing else, what kind of join will work with a long list compared to a value from a short list?
Mailing List Manager, Send To List
I'm looking for a mailing list script (php) that has a function to let users to reach out to all recipient on the list by simple send the email to a specific maillist- address. Mailman has this functionn but as a just got a webserver account I can't use mailman nor install it.
Fields
For some reason, the edit field gets messed up when editing if there is HTML in the data. How can I fix this and also how can I make the fields for parasitedescription and parasiteremoval bigger to like 3 lines in height? Code:
How To Delete Fields
I would delete with php, all record of a table mysql where the seven left chars of the field is equal to the data in input($seven_chars). I have used the the belowe istrucrion but it do not work.how can I do? mysql_query ("DELETE FROM my_table WHERE substr(myfield,0,7)=$seven_chars");
Getting Specific Fields From A CSV
I've been using fgetcsv to populate an HTML table with CSV data and so far it has been working great. But now I'm looking to call specific data from the table (ie: row 3, column 5), and I'm not sure fgetcsv can be used for this. Every online example of its use involves getting all the CSV data from a file as my table has done. What function should I use to get specific fields from my CSV? My table doesn't use unique ids, at least not like mysql, with a unique number identifying each row in the leftmost column. What then should I use to identify each row from which I'd like to get data? I'm making a page that describes a person based on the query string and the information in the database, in which each person has a row. So example.com/example.php?christopher+walken would bring up a page where Walken's information is listed. So I guess the ideal way to do what I want is to query the CSV for the name in the query string (Christopher Walken), then get and print the other information in the row (tall, great guy, etc). Any suggestions on this query?
How To Get The Fields From A Table
Because the fields i make in the table are very subject to change and i want to know them without to have written in the php code. So i want to know all fields names from a table in a mysql database.
Spacing In Fields
I have a posting system for news, the admin types in what news he wants to post on his page via an admin section and another script out puts his comments from a database. My problem is as follows, if someone types a post and adds a space in it how to I get php to recognise this as a <BR> or whatever, e.g : intended post : "news blah blah etc regards . . ." but this is what I get "news blah blah etc regards . . ." as if the whole thing were one line, does anyone know a little trick for this ?
Lookup Fields
What would the code look like to do the following? Say you were working with customer and order tables. You are entering a new order, and key in the customer id in the orders table. Or even choose from a dropdown. Now say you have several other fields about that customer that you want filled in from the customer table, ie name, address, phone, etc... Once that customerid is entered and a tab key is hit, how do you have the other fields looked up and auto filled in in code? Please be basic here, I am new to php programming. But the auto fill in is wat I am trying to learn. By the way, I'm not looking for a short list type of thing, assume the customer table has several thousand records. Ive heard of doing thing this with ajax. Ok how? I have no idea how the code would look. So far I'm only up to a simple flat file database. I'm trying to learn more now. Please see this for a more detailed description of what I'm after. http://www.codecomments.com/archive...5-9-623448.html
Search Across Two Fields?
Say i have two fields, first name an surname There is a person: First Name = David Surname = Jones Could I make a search which would find this person whether David was entered or Jones was entered. i.e. what you put in the one search box would check both fields to see if this record was there. Also, say I search david Jones on the form, and it searches the first word from First Name and the second word form surname.
Query Used Over Two Fields...
Is it possible to make a query to find a field using another field of a table without using any user ID. Because basically i have: House table country Table in country table i have "cityID" and in house table i have "cityID" so what i wanted to do was call up a variable as: $Country by using CityID in house table and searching that cityID in country table to find the country name and put it to "$Country" can this be done using a query.. im only used to using queries using sessions of user ID this is the first time it wont use a session...
Passing Fields
I got a problem with passing parameters, and hope for some help. The problem is as below: I got a website, and would like to pass a field from one page to another. So forexample, if this is how the url will look like when someone comes into the site: www.mysite.com?id=xxx Then, there is a coding on the site: $id = $_GET["id"]; and this allows me to get the id parameter and store it for use, so that on links in that page, I can just put: www.mysite.com/linkpage2.php?id=<?echo $id ?> and this will allow me to pass the id=xxx onto another page. Now the problem is this. If suppose someone came and for some reason, the id=xxx field is missing. So their url will look like www.mysite.com. Now the $id = $_GET["id"] will give an empty field, and when someone hovers over the link, it will just show www.mysite.com/linkpage2.php?id= . Is there anyway to code it so that if $id is empty, as in this case, then it will automatically fill $id=noid or something similar, so that if someone hovers over the link, it will show www.mysite.com/linkpage2.php?id=noid . I tried putting this line in: if ($id == "") {id == "noid";} but it doesn't work. When hovering over the link, it still shows www.mysite.com/linkpage2.php?id= .
How Do You Get Required Fields In PHP
In HTML forms you use the 'required-value' to ensure that a field is completed before submission, is there any way to do this check in PHP? If so could you please give me an example or a link to where to find it.
Adding Fields With PHP
Basically i have created a shopping cart in PHP but before that there is a page for the item and a selction of variables e.g. sizes and colours all with different prices, How would i go about having a total underneith that automatically calculates the total of the options the user selects?
Duplicating Fields
I would like to duplicate text fields and then insert that data into MySQL. So if I have one text field, I click for instance a plus sign and another text field appears.
Formatting Excel Fields Using Php
I have managed to create and excel file using php, I display the results in html and have a link to create the excel file. I need to format one of the fields as "text", is this possible?
Process Form Fields
Hi, I need to process a generic html-form. Is there any way to access to the form elemts as an array?
Stripslashes() And Text Fields
I have got a file that acts as an news edit form for people to edit info pulled from a database. There are a few fields but specifically a title and a content field, both of which pull existing content from the db and set this as the initial value of the fields in the form. When i echo these to the page i run the stripslashes function on both fields. When both entries in the database have inverted commas stored in the fields only the text area will display them. The text field shows nothing. I have checked the table and the data is there stored correctly, (ran addslashes on ther way in). I can echo them straight to the page but not to the text field. Strange? The code is: <td><input size="50" maxlength="250" type="text" name="auntyTitle" value="<? echo stripslashes($rows->auntyTitle); ?>"></td> </tr> <tr> <td><textarea name="auntyContent" cols="40" rows="10"><? echo stripslashes($rows->auntyContent); ?></textarea></td>
Empty Fields For Every Record
If i have a table structure like in my attachment, how can i check for empty fields.That is, I want to check for every record in the table if lastname, street, zip, city and pwd are filled. For example, in the second record that is with id no:2, street and city are empty.Similarly for the next record with id no:3, lastname,zip and pwd are empty. So, idno:2 and idno:3 are incomplete. Now, what i would like to do is, if i press a button, i want to send an e-mail to the respective e-mails which are in idno:2 and idno:3 that they need to fill their information again. Could somebody please tell me how can i do this one?
Using Distinct With Other Fields In Same Query
I have a mysql db with a list of doctors in it. Each doctor has a unique medid, but can have multiple entries because they have different specialties and departments. In generating a phone list, I need to pull their distinct medid's so that they aren't in the phone list twice, but dont seem to be able to generate a query that gives me the right results. Here's a sample.. 217 450 Neuroscience Neurology Abbott Faith 37 173 Medicine Allergy Akbar Raana W. 264 2 Radiology Interventional Radiology Akbar Jamal U. 279 2 Radiology Radiology Akbar Jamal U. fields are uniqueid/medid/dept/specialty/lastname/firstname/middle I have used "SELECT distinct medid .... " and that works, but as soon as the other fields are added, I get duplicate records. Jamal Akbar, medid=2, should only have 1 record pulled.
Trying To Duplicate Form Fields.
What I would like is to when someone writes in one field. The same text is written in a seperate field. But without sending anything. all internally. Anyone have a clue?
Form Validation- One Of Three Fields
I've been looking for a PHP script to accept a search form for either the name or town or postcode fields to search a MySQL db. I would like the user to put in any one search field but not none. Also I am trying to figure out a select statment to select one item on a drop down form list or any item on the list eg the list would be dog, cat, horse, fish or all, the column would be pets. The search would pull out any single pet or all pets.
Populate PDF Fields With PHP Variables
I have a HTML Form that needs to take the variables and place them into a PDF with the corresponding fields that I have created with acrobat. I guess there is a two-part question coming up. 1. What is the process of taking my HTML variables and placing them into the PDF fields in the PDF file I created? 2. Does PDFLib that I hear so much about accomplish this task?
Making Fields Equal
I have two tables in a database and I have an html form. The tables both include a field called id# and that's how I have linked the tables in my SQL statement. I would like to set up my form so that when someone enters an id# it will write the value to the id field in both tables. Does anyone have any idea how I'd go about doing this?
Empty Fields In Forms
I'm working on a script for a form for people to submit their info ( Name, e-mail, AIM, website URL etc). Now it is possible that some people don't have AIM or a website. I'm using a html table to display the info on the member page and empty fields make the table look strange. Is there a way to set some default value (like N/A) that would be displayed in case a field is left empty?
Testing If Two Fields Have Data In Them
Im trying to test if two fields have been entered at the same time I have tried many combinations but cant get it. My last effort was if(isset($_POST['Link'] && isset($_POST['uploadedfile'])){ die('You can't select to upload a link and a file at the same time.'); } else { STUFF HERE; } but still cant get it to work.
Two Tables Selecting Fields
Suppose I have two tables A and B Table A has fields A1, A2, A3, ... A9 Table B has fields B1, B2, B3, ... B9 I want to select all fields in A and only B3 in table B. I dont want to list individual fields for A because they are too many I simply want to use a *. How do I do this? I tried this way but they are not working Select * from A1, B3 from B Select *, B3 from A, B
How To Check Empty Fields
If i have a table structure like in my attachment, how can i check for empty fields.That is, I want to check for every record in the table if lastname, street, zip, city and pwd are filled. For example, in the second record that is with id no:2, street and city are empty.Similarly for the next record with id no:3, lastname,zip and pwd are empty. So, idno:2 and idno:3 are incomplete. Now, what i would like to do is, if i press a button, i want to send an e-mail to the respective e-mails which are in idno:2 and idno:3 that they need to fill their information again.
Updating Auto_increment Fields ?
I have a table with quiz questions. Each question has a unique ID, based on an auto_increment field. Now I've discovered that with deleting rows from the table the deleted ID's are not reissued. Makes sense, just thought of that a bit late. How can I simply re-index or update or how one would call it, the columns holding the ID numbers ? Is there a ready-made mysql command or do I have to load all rows in PHP and modify where necessary ?
How To Show Only Entered Fields ?
I am getting lost in showing data entered in a form to a confirm page. I have a form with as many list/menu as the categories existing in the database. DONE when user choose the items from the list/menus they are passed on to a second page where he can check if all data are correct and then send it. DONE However on the confirm page the script returns also empty lines of text for the missing fields. I would like to just have the fields entered by the user one after each other and not as they were on the first form. How can I get rid of the empty fields ? ( of course just removing the <BR> tag is not a solution ) I post the code of both pages below ( only the part of interest ) <form name="form1" method="post" action="send.php"> <p>Please check the data u entered</p> <p> <input name="hiddenField" type="hidden" value="<?php foreach ($_POST['field'] as $name=>$value) { echo nl2br("$value"); } ?>"> <?php foreach ($_POST['field'] as $name=>$value) { $split = split("=", $value); $pieces = explode("=", $value); echo nl2br("$pieces[1]<BR>"); } ?> </p>.....
Populate In To The Form Fields
i worked on some programs that gets the datas from the user and insert them in to the database.now i want to retrieve the data from the database and i want them to populate in to the form fields.
Checkbox In Mysql Fields
PHP selects and shows a list of records. Next to each record is a check box. If user checks the box the record(s) is selected and appended to another 2nd DB....when the user finally presses a button Basically I hope you get my drift, pretty normal but powerful stuff... Are there any tutorials or snips on how I'd do this?
Parse PDF Form Fields In PHP
I am trying to find out if it is possible to open a pdf file from within PHP, and parse its contents in order to extract all form fieldnames that might have been previously setup within the pdf itself. I want to find this out so that I can then generate a HTML form with all required questions, which when submitted, will generate a fdf / xfdf file, using the techniques from the following tutorial http://koivi.com/fill-pdf-form-fields/tutorial.php
Posting Form Fields
I have a form like the one below. Upon submit I would like to self post to the same page but have the original $_POST data( which was posted to this page from another ) also be sent along with the new form field data. How can I achieve that? Thanks. <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; ?>"> <table> <tr> <th><input type="text" name="fields[]"</th> .... <th><input type="text" name="fields[]"</th> <th><input type="submit" value="Add" name="add"</th> </tr> </table> </form>
Quotes Entered In Fields
If I enter text into a field containing an apostrophy ' the script run through ok but doesn't place the data in the table ? What's the answer to this?
Empty Form Fields
I have a simple HTML form, which when submitted I want to check whether he fields have been completed. If everything is complete, I want to process the form....No problem with this bit. If any of the fields are not complete however, I want to indicate this......for example by placing a * character next to the field which is empty i.e. echo "<TR><TD>Username</TD><TD><INPUT TYPE=text NAME=username></TD><TD>*</TD></TR>"; I am guessing that the best way to do this is submit the page to its self, and check for any empty fields, then display the form again. What would be an efficient way of doing this, given that I have to check about 20 fields?
Form Fields And Verification.
suggestions to with keeping data entered into form fields in place after verification fails and the user is requested to re-enter some missing data. Is there a smooth way to do this with PHP and forms, or would it be best to try and use javascript for a form, so when the "back" button is hit the data is remembered?
Hidden Form Fields
i want to output the value of the "hidden form field". When I hit submit, the the value is put to the hidden form field. when I hit the submitbutton a second time the value of the hidden field is dispalyed. Is there a way to display the value on the first submit Code:
|