Jump to content

Recommended Posts

Hello..

 

I am totally lost here, I dont have any idea to do it..

 

I have a system, each time user enter a new data, it will be put into database, and users can view the data in a page..

 

lets say user key in this data

no: 300

title: abc

mentor : awie

 

so, users can now click on a new link appear on a page, lets say "300", then it will lead to the page showing the number 300, title abc and mentor awie.

 

the question is, how can i create a page each time users key in new data, i can only think about manually creating new page..but how if users key in 500 data per day? tried to google but cant find suitable phrase to search..

 

ps : sorry if this is totally noob question, because im a totally lost noob here :(

You would store the data in the database and pull it based on a key, usually an id.

You can either pull the data from the database using $_GET or $_POST, if you're using a form. You said you were using a link, so you'd probably used a sanitized $_GET.

 

More information here: http://www.tizag.com/phpT/postget.php

 

You wouldn't physically create a new page as the amount of space you would waste if you ended up getting thousands of users would be massive. You would create one page and use PHP to dynamically pull information to fill the page based on the key retrieved from the database.

 

 

Try reading up on PHP before starting; I suggest starting with Tizag's tutorials as PHP.net's information can usually end up going over the heads of people just starting out.

You wouldn't physically create a new page as the amount of space you would waste if you ended up getting thousands of users would be massive. You would create one page and use PHP to dynamically pull information to fill the page based on the key retrieved from the database.

 

exactly, but i couldnt explain it in my last post. the "1 page which will pull infos from database" is what i need. will read the tizag first, anyone with anymore idea are welcome to give opinion. thx elis :)

Well a simple example would be if you want to pull id 300 from your database, you would do the following:

 

 

Set your URL as http://www.yoursite.com/yourpage.php?id=300

 

Then in yourpage.php

 

<?php
$id = $_GET['id'];
$result = mysql_query("SELECT * FROM yourtable WHERE no = '$id'");
$row = mysql_fetch_array($result);

//whatever information you want to be pulled from the database using $row['fieldname'];

?>

 

Above is a very simple generic, not sanitized nor checked version of something of what you would do -- just to point you in the right direction.

 

 

Well a simple example would be if you want to pull id 300 from your database, you would do the following:

 

 

Set your URL as http://www.yoursite.com/yourpage.php?id=300

 

Then in yourpage.php

 

<?php
$id = $_GET['id'];
$result = mysql_query("SELECT * FROM yourtable WHERE no = '$id'");
$row = mysql_fetch_array($result);

//whatever information you want to be pulled from the database using $row['fieldname'];

?>

 

Above is a very simple generic, not sanitized nor checked version of something of what you would do -- just to point you in the right direction.

 

<a href='pullclosednf.php?id=$id'>

 

problem solved..thx very much elis ;)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.