Dynamic Pages [PHP] & [MySQL]
Hello!
I need to guidess, i started recently with thinking about starting with PHP. I had a fun idea what i wanted to do.
So i had a basic idea, to create some info about someone or something ill use as a example a person. I wanted to register the info into a database (What is actually working).
And then i did want to display the info of 1 registered object like.
So i did a little research on how i wanted to do that and i believe its called dynamic pages?:mellow:
So i found
Im kinda stuck now and might need to adjust the way im learning or trying to learn atleast.
What im doing now is lookup work mostly copy it make it work and then see if i can understand whats going on.
Can someone give me a direction where i can find something like this?
(The Full idea is where i have a search bar that will accept ID's for now and brings me to the right page with the information i wanted. Later i want to change the search function from ID to a Firstname.)
Not sure how to post if i've got an update so for now ill add a comment.
I found Dynamic urls where some people were saying how to use it so i tryed
And im getting
Hello!
I need to guidess, i started recently with thinking about starting with PHP. I had a fun idea what i wanted to do.
So i had a basic idea, to create some info about someone or something ill use as a example a person. I wanted to register the info into a database (What is actually working).
And then i did want to display the info of 1 registered object like.
Code:
ID = AI
FirstName
LastName
Gender
Adddate
So i did a little research on how i wanted to do that and i believe its called dynamic pages?:mellow:
So i found
You must be registered to see links
but its focussed on showing comments what might be fun later on.Im kinda stuck now and might need to adjust the way im learning or trying to learn atleast.
What im doing now is lookup work mostly copy it make it work and then see if i can understand whats going on.
Can someone give me a direction where i can find something like this?
(The Full idea is where i have a search bar that will accept ID's for now and brings me to the right page with the information i wanted. Later i want to change the search function from ID to a Firstname.)
Not sure how to post if i've got an update so for now ill add a comment.
I found Dynamic urls where some people were saying how to use it so i tryed
PHP:
<?phpinclude 'configs/mysql_connect.php'$id = (int)$_GET['id'];$sql = "select * from users where id = $id";$result = mysql_query($sql, $conn);
if ($result){ $row = mysql_fetch_row($result); $title = $row[0]; $content = $row[1]; }?>
<html> <head> <title><?php echo $title ?></title> </head> <body> <h1><?php echo $title ?></h1> <p><?php echo $content ?></p> </body></html>
And im getting
Code:
[COLOR=#000000][B]Parse error: syntax error, unexpected '$id' (T_VARIABLE) in C:\wamp\www\index.php on line [/B][/COLOR][I]3[/I]
Last edited: