Hello cool peoples, so I couldn't figure out if images could be added in the post therefore follow the prescribed link at the end of this post.

Problem: I do not know how to create whats going on in the pictures. I try not to use terms to define what's going on because I don't want to confuse anyone as I am unsure of what to call what I'm trying to do. Only thing I know is it has an "entry form", a "search engine" and makes use of a "database". If anyone knows how I might be able to create this thing or know of any applications that I maybe able to utilize for the development of this application that would be very helpful.

And I'll break it down further, basically we want users to be able to submit "data" which is then stored in the database. That data is then retrieved upon using the search engine. That's it. Very simple tool for users to make use of.

Link: Click Here

hello,

What you are interested in implementing should not be too challanging. You first need to decide on what server side scripting language you will be coding this in. For example, while the web pages will be coded in HTML, to handle the database connections, you'll need to include a server side scripting language such as PHP, ASP.NET, or even ASP. You'll also need to be comfortable working with a DB (MySQL, MSSQL, etc..)

On the "entry form" page, that submit button needs to run the code to connect to the database and INSERT records into a table. The "search engine" page would also have a textbox and submit button which then runs code to query the database table using a SQL SELECT statement.

Check with your hosting provider to see what server side scripting langauge and database platform they support. Not all of them will have all of the options described above. Some only do PHP, while other will do PHP and ASP.NET. Some only offer MySQL, while other offer MySQL, MSSQL, MS Access, etc...

Of course, this is a high level explanation. If you plan on coding this yourself, first, it is very helpful if you are comfortable with HTML, CSS, JavaScript. Next, is the server side scripting. This can take a little longer to learn, but your project sounds pretty simple so its basic whether you choose PHP or ASP.NET.

Finally, the DB, the provider will set it up to you and all you need to know is how to connect to it from your code. There are a lot of examples on the internet on how to do this so that shouldnt be an issue for you.

Awesome, thanks a lot for your response dude :-D

I'm going to use PHP for the scpt. language.

I'm using MySQL for the DB creation and my host uses phpMyAdmin to add data/tables to the database and umongst other functions I'm not too familiar with.

Current Problem: I'm running into a deadend when I try to connect to my database using Dreamweaver. I'm using localhost for the MySQL server connection which is what my hosting provider told me to use. And the user name and password stems from the database I created under phpMyAdmin. I gathered how to do this under this tutorial

I have a feeling there is some info. I'm missing that's related to connecting to phpMyAdmin.

On the "entry form" page, that submit button needs to run the code to connect to the database and INSERT records into a table. The "search engine" page would also have a textbox and submit button which then runs code to query the database table using a SQL SELECT statement.

To run the code to connect is very new to me and sounds very interesting, I wonder if we could come back to this after we figure out my connectivity problems.

Not a problem. I have been fairly active on this site so when you get back I'll be more than happy to assist you with any questions you have if I can.

with regard to the DB connectivity, your hosting provider should be able to help you sort out the code. Dreamweaver is good, like other developmenta apps, at dragging and dropping controls into your project, but you may need to tweak the code behind the scenes. I am sure you will figure it out soon.

Using PHP

Step 1 create form with html. Create input fields for each peice of data you would like to collect. i.e. firstname lastname email ... so on.
Step 2 create a php function or method to process the user data.
step 3 use the processed data, to insert into mysql db, or the db you are using.
step 4 create form with html to provide search feature.
Step 5 create mysql query to search db.

example search query:

$q = mysql_query(SELECT $search_term FROM db_table WHERE search_param= $search_param LIMIT 10");

you can get more complicated with your search query, also you can play with your db and set full text search.

you will then need to echo out the results of the search query to the page.

Its more complicated then what i have explained but you can get the idea of what needs to happen.

Hey thanks gabrielcastillo!

My host provider just explained that I do not have rights to connect using Dreamweaver. Despite poor hosting technical service, I was informed that there is a way to do what I'm trying to do, simply by googling "MySQL tutorials". So this is where I'm at currently stuck in stand-still.

But I will try the 5 steps that you have provided. Only question I have stems from steps 2, and 3. How would the code look for this and where would I nest these files?

Here is a simple form processor, you would changed the post vars to the name of the inputs you use in your form. Also you would want to do some input sanitation for security. This is a very basic, so you would have to some research and modify to what your needs are going to be.

<?php
    //Empty error var for error checking
    $error = '';
    //Check if user has submitted for
    if(isset($_POST['submit'])){
        //Change POST array index's to var's
        $firstname = $_POST['firstname'];
        $email     = $_POST['email'];
        $username  = $_POST['user'];
        $password  = $_POST['password'];

        //Check if submitted inputs are empty
        if(empty($firstname)){
            //Do something like error msg
            $error .= 'Please enter firstname';
        }
        if(empty($email)){
            $error .= 'Please enter email';
        }
        if(empty($username)){
            $error .= 'Please enter username';
        }
        if(empty($password)){
            $error .= 'Please enter password';
        }

        //i()f Error var is empty
        if($error == ''){
            $q = mysql_query("INSERT INTO user(firstname,email,username,password) 
            VALUE('$firstname', '$email','$username','$password')");
            //Check if query was a success
            if(!$q){
                die("Query Failed") 
            }else{
                echo "User has been inserted into database";
            }
        }
    }


?>



//The form
//If you are using the same page for the form processing, your action would be php_self or "" blank, else you would insert the file of the form processor page.

<form action="<?php $_SERVER['PHP_SELF'];?>" method="POST">
<div>
    <p>Firstname: <input type="text" name="firstname" /></p>
    <p>Email: <input type="text" name="email" /></p>
    <p>Username: <input type="text" name="username" /></p>
    <p>Password: <input type="password" name="password" /></p>
    <p><input type="submit" name="submit" value="SEND" /></p>
</div>
</form>

Awesome, I've got the connection figured out!!

Now the hard parts. I just want to thank you all again for the direction y'all have offered. Will update you soon on any successes that take place!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.