If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > a problem in php

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-21-10, 05:23
don_log don_log is offline
Registered User
 
Join Date: Jun 2008
Location: pakistan
Posts: 109
a problem in php

i want to create a url i have 1 field called title it gets title from database but i want that it creates it url like blogger.com that when you post your post shown in side bar but my shows only title and i want it make it hyperlink like this is first post it shows only this
i want that it shows it's link by clicking on them it goes to that post


like database have first post title called "this is first post" i query that
PHP Code:
<?php 

mysql_connect
("localhost""root"""); 
mysql_select_db("databse"); 
$id $_GET['id']
$query "SELECT title FROM table LIMIT 1"
$result mysql_query($query); 
if(
$num=mysql_numrows($result)) 

$record mysql_fetch_assoc($result); 
$name $record["title"];
echo 
$name;
}

]
when it carray titles so it also make that one hyper link so user click on that one title it goes to that post something like this
localhost/index.php?id=1 or 2 or 3 or 4 etc
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On