Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Dropdown List Which Selects A Post A Title (to Edit)


I want to have a dropdown list which selects a post a title (to edit), then when you click submit I want to use POST to submit the data for that post (post title, username, subject, content) so that the edit pages form fields will already be filled with the posts data.




View Complete Forum Thread with Replies

Related Forum Messages:
Dropdown Selects From $_POST
I'm still working on my form, and part of the form is an age select dropdown. I'm leading them through an approval process and if they'd like, returning them to the form to fix any errors.

The only way I know of having it show up correct in the dropdowns is to do an if statement on each option from the $_POST data. This is cumbersome, as I have 3 selection boxes with many options in each. Is there a better way to do this than to create an if statement for each option?

View Replies !
GET, POST, Multi-Selects
When the HTML of a form has a field name 'choices' and has five checkboxes with that name, each with a different value, like this:

Code:
<form name="testform" action="processor.php" method="post">
<input type="checkbox" name="choices" value="One">One
<input type="checkbox" name="choices" value="Two">Two
<input type="checkbox" name="choices" value="Three">Three
<input type="checkbox" name="choices" value="Four">Four
<input type="checkbox" name="choices" value="Five">Five
<input type="submit" value="submit" name="submit">
</form>

In PHP, without altering the HTML at all (assume that I have no control over the HTML because there will be remote forms already coded by others that submit to this script) if I look at the values through the PHP-approved method (assuming that every checkbox was checked by the user), I see: Code:

View Replies !
Dropdown Date Selector That Automatically Selects Todays Date
Does anyone have a PHP generated dropdown date selector that automatically selects todays date on page load that i can pinch?

View Replies !
Use Strcmp To Edit A Dynamically Generated Dropdown...
I've written a code that runs a 'SHOW DATABASES' query on my mysql server and lists the results(the names of the databases on my server) in a dynamically generated dropdown box, and it works just fine, using the following code:

echo "<select name='databaseselect'>";
$dblist = mysql_query('SHOW DATABASES');
while ($row = mysql_fetch_row($dblist)) {
echo "<option value='$row2[0]'>$row2[0]</option>";
}
echo "</select>";

The problem is that it lists ALL of the databases on my server - that's two of my own user-created databases, and the two default databases that come with the mysql server - 'information_schema' and 'mysql'.  What I want to do is to, after running the 'SHOW DATABASES' query, eliminate those two databases from appearing in the dropdown box, because I don't want anyone to see them, as they're useless to anybody else. Code:

View Replies !
Populating A List Box Or A Dropdown List Using Php And Odbc
I need to populate a list box and/or a dropdown list on a form. I have all
the bits and pieces together, all bar the code which takes the result of a
query and creates a list box.

View Replies !
One Title And Several Sample Images For Each Subcategory On A List
I have a site with lots of images organized in categories and subcategories. Whenever a category is chosen (say, "Pets"), I want to display the list of all available subcategories so that each subcategory has a title and 3 sample images, like that: Code:

View Replies !
Thumbnail Images With Rollover Post Title
I'm trying to have alter a featured posts plugin on Wordpress. I'd like to have the thumbnail appear with the title appear when the user rolls over the image. Code:

View Replies !
Dropdown List
I have a Dropdown list with Select with 1, 2, 3, 4, after select on of them it bust to refresh the page to what you select but it don't do it. PHP Code:

View Replies !
Dropdown List Box
I am able to populate data in a dropdown list box using php and mysql. However, I a wondering if i can add inside some icons such as close or More records,  where the drop down acts to the specified request, ie., closing the drop down or fetching  some more data from backend.

View Replies !
Populating Dropdown List
I am wanting to know how to populate the <SELECT> dropdown menu with all existing values from the DB and also have the value associated with that id selected. This is an updating area of my admin. Any ideas? Here's the code so far. At the moment it only retrieves the value assigned to that id. PHP Code:

View Replies !
Smarter Way Of Doing Dropdown List?
I've got a dropdown list that is acting as a filter on a table, so the user can select a value and the page is reloaded only showing the matching values from the database.

Now when the page reloads the dropdown was set to 'all' as it was first in the list, even if I'd selected a different value, this was confusing for users, so I added an initial <option> field which pulled the correct value from $_GET (code below) - however this is a little odd as it means the value appears twice!

Does anyone have a genius solution to this?  I've seen a <select selected="yes"> sort of thing around, but I don't know how I can tell the php to add this value dynamically? 

<select size='1' name='occupation'>
<option>".$_GET['occupation']."</option>
<option value='All'>All</option>
<option value='Student'>Students</a></option>
<option value='Professional'>Professional</option>
<option value='Hobbyist'>Hobbyists</option>
</select>

View Replies !
Mysql Dropdown List
Im trying to automatically fill a dropdown list with data from MYSQL table.

Sizes Table
--------

ProductId | size1 | size2 | size3 | size4 | size4 | size6 |

* the 'size' rows hold a numeric value for the quantity I have of each

I was hoping to only list the sizes that have a greater number than 0.
I have used an auto fill select code on another project but I'm just not sure how to fill in the blanks. Code:

View Replies !
List The The Entries Of The Dropdown Box
How can I list the the entries of the dropdown box (which are all populated) according to the time they are populated.

View Replies !
Check The Dropdown List
i have a drop down list in my php code. i need to check the drop down list is set or not. for that what is the code. i heard that there is no php code for that. javascript is needed. my code is here. PHP Code:

<?php
$database="sms";                    /* DB name       */
$host="localhost";
$user="root";                        /* Set DB Username */
$pass="";                            /* Set DB password*/
mysql_pconnect($host,$user,$pass);  /* DB connect....*/

mysql_connect ($host,$user,$pass);

mysql_select_db($database) or die( "Unable to select database"); /*DB Select*/

function orgresult()
.......

View Replies !
Add Variables To Dropdown List
I have a list of variables:

$variable[0]
$variable[1]
$variable[2]

The amount of variables changes so i've used $total = count($variable) to find the amount there are.

How would i tell php to create a dropdown menu with the amount of options=$total and then fill the options with $variable[0] etc.

I know i can use a loop to increase the value of say $i by one each time to that i can use $variable[$i] each time, i'm just stuck with adding the whole thing to a dropdown menu with the right number of option...

View Replies !
Autopopulate Dropdown List From Database
An events-registration page with a form containing a dropdown list for upcoming events, the events will be pulled from a table which is updated by...?

what i've gathered so far is that this can be done with PHP. I am a little unclear on the concept of how this is done. How does the updated information get input into the table?

1) can this be done (updating database) through a web interface by the client, or is it something i would have to do locally and then upload. If done by the client, can he delete/edit existing information--assuming he is not familiar with code.

2) what other things aside from html(good), sql(so-so), and php(newb) will i have to know?

i've seen a lot of good tutorials here and will have access to the necessary software. I just want to know if there is anything else i should know before i dive in head first without testing the PHP water, which i assume is frigid.

View Replies !
Dropdown List Of Files In Folder
I am preparing a form that includes a drop-down list consisting of the names of files in a certain folder on the server.

I only need to trap the file name (jpg), not the path and I'm not trying to upload the files or anything - simply allow the user to select one of a number of different image files (they're actually location maps).

View Replies !
Dropdown List - Trying To Get Default Populated From Db.
Nooby question but when I try and get this to work (it should identify which
rows in the database have GK, MID, DEF, FWD against them and then put
SELECTED into the option value to give a default of what the entry is
currently) it just adds SELECTED to all the results as if $row["Position"]
is returning true against all four conditions? What am I doing wrong? CODE:..

View Replies !
Cascade Dropdown Or Conditional List
I would like to create a conditional cascade form.  based on the selection, it can display or not display an input form for the user to enter an string of text. then at the bottom of the page (or when a user submit) connect all the sections including the input field all together (it's like a story maker?)

View Replies !
Microsoft Access Dropdown List
l am building a new site using PHP which has a lot of pages pulling from an Access Database. I would like to have a dropdown list that pulls exhibitions from the database and then when the user selects one it shows the rest of the details from DB just below the dropdown list, hope that makes sense. Code:

View Replies !
Trying To Create Dropdown Menu From List
I am trying to create a dynamic dropdown select menu from a directory containing other directories and files. This is to select a certain page from the list so I can edit it. I only want the files in the menu. Here's what I have so far but it doesn't populate the dropdown. Code:

View Replies !
How To Create A Dynamic Dropdown List
how to create a Dynamic drop down list using Mysql.

View Replies !
Dynamic Dropdown List Using Access
I am creating a dropdown list that is populated from an Access DB: Code:

View Replies !
Dropdown List Selected By Default?
Does any one know how to have an item in the dropdown list selected by default?

$city_field = HTML_QuickForm::createElement('autocomplete', 'city', 'City', $cities);

$cities is an array of city names and I would like, say 'Los Angeles' selected by default.

View Replies !
Dropdown List - Insert Into Mysql
I simply want to add a dropdown list where, when an option is selected, its value will be inserted into a dbase table. More specifically, asume there is a page where the user sees his order.

He will be able to select the order status (pending or delivered). So, for example, if his ordered is deleivered, by selecting "delivered" option, "delivered" will be inserted into the 'Status' column. Code:

View Replies !
Post Edit System
I'm trying to work on my edit system on my site, after realising that a separate edit box wouldn't be possible under each message if the user had pressed edit on that post I decided on doing what all modern forums do, use a separate page to edit the corresponding post.

So far I am using <a href='?action=edit&id=$row[id]'>Edit[/url] under each post which works fine. I've got it displaying a edit box at the bottom of the main news page(index) but it's a little far away right down the bottom of the page. How can I do it like this forum and many others do?

View Replies !
How Do I Edit A List Of Files Associated With A Product ?
-I wrote a script that you use it to add products in the database.
-Each product is associated with files.
-In the Form to add the product you have to enter the product name in a
textfield and below there are $no_of_add_file filefields.
$no_of_add_file is an integer that determines the Maximum number of
filefields that you want to associate/add for each product.

So it succesfully adds the product and the files in a database and the
filesystem.

The problem I am trying to solve is how am I going to edit those files in
the product.
If you know what I mean... and you have done something like that or you know
a url or script that does that, pls let me know.
What I need mostly, is not the PHP code but the logic and what are the
possible ways of doing something like that.

In the database i have two tables that this script needs:
One is the products and the other the files.

Products : product_id, product_name
Files : file_id, file_name, product_id

View Replies !
Select List - Edit Form
For a couple of days I have been trying to make an edit form that remembers the initial values a user entered. The edit.php page has a few textboxes and a few dropdown/select boxes. The textbox part works fine and comes from a database. Code:

View Replies !
Change List View To Dropdown Menu
Im working on a script that has to be change so a user can choose from a dropdown menu instead of a list that now is displayed.
Here is the part that is insert on the index page.

View Replies !
Auto Fill Dropdown List Error
Im using the code below to autofill a dropdown list from my MYSQL DB.
The only problem is it is leaving out the first entry (alphabetically) for each $vehicle_make ? Does anyone know why this may be hapenning? Code:

View Replies !
Stuck On Dropdown Menu List, Could Use Some Guidence
I have a form with some drop down list/menus. I do a check for ommissions and if found display a message to re-try. What I need is a way to show which options where chosen when the user submitted the form the first time.

If someone could show me how to do the first one, I'm sure it's the same process for the second one. Here's the code:

View Replies !
Auto Fill Date Dropdown List
How would I modify this code to display the years in the dropdown list like so:

current year
2006
2005
back 50 years

<select name="year" id="year">
<?PHP

for($i=date("Y");
$i<=date("Y")+2;
$i++)
if($year == $i)
echo "<option value='$i' selected>$i</option>";
else
echo "<option value='$i'>$i</option>";
?>
</select>

View Replies !
How Does Myadmin List Field Names To Edit?
I'm trying to setup an edit page so that the user can edit any data he entered earlier.
Say he entered all his stuff in and found a mistake and he wanted to go in and make a change. Simple UPDATE command. Code:

View Replies !
Creates A Dropdown List Of Information Belonging To That User.
I have a page that uses php to look up specific fields in a specific table of a specific database based on the username. Using this, it creates a dropdown list of information belonging to that user. The fields in question each have 13 pieces of data. Based on what they click in the dropdown box, I need that specific data to pass onto hidden fields on the page. Code:

View Replies !
Easy Comma-delimited List To Dropdown Box Converter
I was working on a simple converter when I realized that by not setting the id param of the option tag, it wasn't going to send the value of the dropdown box to my php script. I had this to start with: Code:

View Replies !
Pick From A Drop Down List That Automatically Gives Options In A Second Dropdown Box
does anyone know how to create a form that allows the user to firstly pick from a drop down list that automatically gives options in a second dropdown box. eg.

'category1'
is selected from dropdown box 1,
this then populates dropdown box 2 with the options
'category1.a' or 'category1.b'

or if
'category2'
is selected from dropdown box 1
then dropdown box 2 gives the options of
'category2.a' or 'category1.b'

i f any one knows how I should code this please help, if not point me in the direction of a tutorial that can.

View Replies !
$title Not Displaying In <title>$title</title>
For some reason $title will not display in the <title></title> using print or echo. I've tried modifying the if staments to ifelse, and even fiddled with $_GET to get this working. Tried dbl/single quotes, even changed the variable around thinking $title might be a global. nothing working yet. Any ideas?

<?php
$page == 'home'
$title == "Welcome!";
if ($page == 'home') { $title == "Welcome!"; }
elseif ($page == 'about') { $title == "about us"; }
elseif ($page == 'products') { $title == "Products"; }
elseif ($page == 'services') { $title == "Services"; }
elseif ($page == 'repair') { $title == "Upgrades & Repairs"; }
elseif ($page == 'network') { $title == "Network Solutions"; }
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My Site - <?php print "$title";?></title>
</head>
<body bgcolor="#FFE0C1">
...

View Replies !
Drop Down List After A POST?
<SELECT name = "f_hello">
<OPTION value = 'H'>Hello</OPTION>"
<OPTION value = 'G'>Good-Bye</OPTION>"
</SELECT>

I can easily retrieve the f_hello variable which will containts H or G after a POST.

View Replies !
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.

View Replies !
How To Post A Form To A List Document
I'm not looking to learn alot of PHP right now but i am learning enough to get done what needs to be done. I need to no how to make a list document that gets and posted form from a different document and puts it into a list, . heres my form from my input.htm Code:

View Replies !
Display Article's Title In Title Tag
I want to show the article's title in the title tag. But I can't display the title from the article because the title tag is loaded first and the the rest of my page.

I have a solution with javascript but if you haven't enable javascript, you'll see nothing so I want to do this with PHP, but how. Code:

View Replies !
Dynamic Dropdown And Hardcode Dropdown In Select Form
I have plenty of examples of dynamic dropdown choices but none of hardcoded dropdown choices. The ultimate goal is to have a job with various tasks and to track the status of those tasks for a given job. I've used one of the tutorials here to begin the process. Below is the code I have to add work on a given task. Perhaps I actually need to "Update" a job as opposed to "add".

But the problem of the moment is I can't seem to hardcode one set of my options. This is the code I have: PHP Code:

View Replies !
I Need Information From To ......
I have to retrive the title tag information? can you tell me. i
am new to the php ........

can you give the example to get the information between <title> to </title> from the web page...... how shall i get it.

View Replies !
Convert ##TITLE## To $title
Im half way through making an article manager for a new site im launching. If i type ##TITLE## into a text box, when i display the artcile, how do i turn the placeholder ##TITLE## into $title of the article.

i looked at str_replace but i dont think thats what i need... i need something that searched through the text of a var and if it finds anything within ##*## to convert the * into the $var.

View Replies !
Selects
How come my second select form is blank for the first option? I realize the problem is when I put in the $series_design tag, but I don't know why.

View Replies !
Multiple Selects
I want to do a multiple select like this where the user can select multiple items

<SELECT NAME="abc" MULTIPLE>
<OPTION VALUE="A">A
<OPTION VALUE="B">B
<OPTION VALUE="C">C
<OPTION VALUE="D">D
</SELECT>

How do I reference these variable in code or the form that does the processing?

View Replies !
MySQL Selects
I just made my first sql database and PHP interface for it last week I'm getting pretty far with it however I'm having a problem with the select statement. It's looking like this:

SELECT * FROM freehosted WHERE website='$website' AND type='FHG' AND category='$category' OR keywords LIKE '%$category%'

This is working good, however I ONLY want the website designated in the $website variable to display. Code:

View Replies !
Bypassing Selects
I have a profile system which allows members to input info and save it to the database for there profile. A few fields are SELECTS. From Sexuality Favourite Music, So for instance From (England, Scotland, Wales, Ireland) THat works fine, but what happens if someone makes a html document and injects code"

<OPTION>HACK HAHA</OPTION>

Then posts it to my php that excutes and writes to the database. In essance they can bypass the select I have and input what ever data they want. Whats the best way around that, I was going to use a SET in the database structure but one of the selects has about 90 options.

View Replies !
MySQL Selects
what's the most efficient way to grab a single data value from a table field using PHP. the best I have is using a while loop -- but something tells me there is a cleaner/more efficient way:

$sql="select countryType from c_countries where userid={$_SESSION[userid]}";
$result=mysql_query($sql);
while($row=mysql_fetch_array($result)){ $userCountryType = $row[countryType]; }

View Replies !
MySQL Question (sub-selects)
I've seen a few posts about getting around the sub-select problems with MySQL. I am trying to do a "NOT IN" type select, as follows:

SELECT
email
FROM
orfcustomers
WHERE
customerid NOT IN
( SELECT
c.customerid
FROM
orfcustomers c,
orforders o
WHERE
o.customerid = c.customerid
);

Basically, I have a customer table, and an order table, and I want all customers' email addresses that have not yet placed orders.

I can't find a reasonable method for doing this, because I haven't had much experience with the INNER JOINS and LEFT JOINS, etc. Also, the tables each have over 40,000 entries, making it a little weird.

View Replies !
Dynamic Form Selects
How do you make dynamic for selects in php? It is in regards to a modify type scripts im writing in php/mysql.

So regular select drop downs look like so:

<select name=genericselect>
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

right, well if I was pulling info from a database, how would I make is so that the 'selected' value is dynamic and comes from the database? Im sure theres a simple way of doing this.

View Replies !
Selects All Of The Check Boxes
how would i make it to where someone can press all and it selects all of the check boxes in the area.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved