Hi, all of you! I am new to this community. I am a web designer and a friend of mine and I have a server and manage websites (mostly ours but also a few clients). I manage the sites and he does the database management. My friend, an expert at javascript and java programming, is burning out on programming and he doesn't want to do it anymore. I'm stuck, on my own.
So ... now I have to learn PHP (can't use CGI) and database management. I have no problem accessing the database and managing records, and I have no problem connecting to the database with scripts, but I am just learning how to query and return results.
I have been pulling my hair out for a week trying to figure out the following:
I have three independent searches on one page. Each search will call a separate page (I think). On this same page, there are two text searches. I need to be able to have success at the simplest text search first before I can move on to the other text search and the drop down menu search.
My first query needs to result in three fields being extracted from the database table. In this case it is town, number, and sub_number. The results need to return on a page in rows (unlimited) but each hyperlinked. These hyperlinks will be links to internal HTML pages. That's it. I just need to know the proper query syntax and code. If I can make this work, then I will have a better understanding about how to progress further, especially trying to succeed with three searches from one page. Many thanks to anyone who can help me.
2 1439
hi sir, i will try to help ...here's the logic...
page1.html:
[HTML]
<form name="form1" method="post" action="page2.p hp">
firstname: <input name="firstname " type="text" id="firstname" >
lastname: <input name="lastname" type="text" id="lastname">
<input type="submit" name="Submit" value="Submit">
</form>
[/HTML]
page2.php
[PHP]
// database connection
// codes here........... .
// getting the entry from page1
if (isset($_POST['Submit'])) {
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$SQL="SELECT * FROM tbl_name WHERE column_uname = '$firstname' AND column_lname = '$lastname'";
$Execute = @mysql_query($S QL) or die(@mysql_erro r());
while ($field = @mysql_fetch_ar ray($Execute)) {
// assigning value to variable from the result
$firstname = $field['column_uname'];
$lastname = $field['column_lname'];
// output the result
echo $firstname;
echo $lastname;
// break
echo "<br />";
} // End while
} // End if
[/PHP]
Hope it helps a little sir...Good Luck!!!
More power...
Dear exoskeleton,
Thank you very much! I spent a week looking for this, and even paid a few dollars for help at Experts Exchange, but it was like pulling teeth to get my "Expert" to give me some proper code. Great job! Thanks a mil!
Paul Revere
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: vic |
last post by:
My manager wants me to develop a search program, that would work like they
have it at edorado.com.
She made up her requirements after having compared how search works at
different websites, like eBay, Yahoo and others.
This is what she wants my program to be able to do:
(try this test at different websites just for fun).
At eBay:
- enter the word 'television' in a search field à you will get 2155 items.
|
by: Alan Silver |
last post by:
Hello,
I shamefully admit to be an old web designer, from before the days of
CSS. In those heady days, tables were king and were used for every
possible kind of alignment. When CSS came along, it was useful for
specifying colours and fonts for a site in one central location, but
useless for any real kind of design work due to the poor browser
support. I got well in to using CSS for colours and fonts, but carried
on using tables for...
|
by: areese801 |
last post by:
i am using a website with a form that passes criteria to a javascript
to run a query rather than just appending my criteria to parts of the
URL.
i need to import a bunch of records into MS access from this site. this
would be very easy to do if i could just change part of the url and
programatically navigate there. unfortunatly this javascript is doing
all of the querying.
is there a good place to start to be able to get around this?
|
by: jim |
last post by:
Is anyone able to provide me with a link to useful documentation or
just outright explain to me how to set query parameters dynamically?
I'm really new to Access and databases in general but I suspect that
there is a way to insert criteria into a query besides opening it up
and typing "and" and "or" on the criteria row of each column.
I have a query that shows thousands of records (students in different
classes taking different tests)...
|
by: Hexman |
last post by:
Hello All,
I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm
using some VB6 code, .Net2003 code, and .Net2005 code. I'm developing in vb.net 2005.
This test sub just reads an input text file, writing out records to another text file, eliminating records that have a '99' in them (it is similar to
a CSV file).
Some of my concerns are:
| |
by: gozu |
last post by:
Here is my query:
SELECT departments.department_name AS "Department name", locations.STREET_ADDRESS AS "Mailing address", locations.city, locations.state_province, locations.postal_code
FROM departments, locations
WHERE departments.location_id = locations.location_id
AND locations.country_id = 'US'
ORDER BY department_name;
and here is what the output is like:
|
by: deeak |
last post by:
Hi All,
I have set of strings in the db2 table and two range keys to search. I have to finds strings the table which would be in between the range of keys defined.
Strings in the colum to search (COLUMN_TO_SEARCH) :
KAVICEH&,KAVICEH>,K$VICEH&,KAVICEH$
Range of keys defined : KAVIC$$$ , KAVIC$$/
SQL query may looks like :
|
by: Rauf Sarwar |
last post by:
Originally posted by dreimer
You have to use ODBC/ADO etc to connect to the database. I don't know
the exact syntax but you can search in comp.lang.visual.basic NG.
Another suggestion.... dump VB script/ASP and go with Java.
Regards
/Rauf Sarwar
|
by: SharkD |
last post by:
Hi!
I'm a total newbie when it comes to ASP (or any type of server-side
programming).
I want to start a project that does the following:
1. query Wikipedia for information regarding articles using the
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |