Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
help with mysql to php for hyperlinks (explain inside)
Old 12-10-2010, 09:37 AM help with mysql to php for hyperlinks (explain inside)
Junior Talker

Posts: 2
Name: sam moffatt
Trades: 0
NOTE: Fixed sorry!!!, being stupid and not having "http://" at beginning of the url haha.


Hi, i need help with this, everything is fine on it except one thing, the website URL carries on from the website i am on, such as:

want just:
www.jamhoperation.com

but getting:
www.infordesign.co.uk/www.jamhoperation.com

i want it to just have the first one, any way i can create this, this is my code

<?php
$con = mysql_connect("host","a3127580_Tables","password") ;
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("a3127580_Tables", $con);


$result = mysql_query("SELECT * FROM webDesign ORDER BY ID");


while($row = mysql_fetch_array($result))

{
echo "<table style='border: 1px solid #999; width: 100px; background-color: #f9fbfd; color: #222;'><tr><td style='border: 1px solid #999; color: #222; font-size: 12px;' align='center'>".$row['webName']."</td></tr><tr><td><a href='" . $row['webWeb'] . "'>";
}
echo "<img src='../images/jamHop.png.png' style='width: 100px; height: 100px; border: 0px;' /></a></td></tr></table>";

mysql_close($con);

?>


thank you for all your help

Last edited by lynxus; 12-10-2010 at 12:18 PM.. Reason: Removed private info
sMoffatt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-10-2010, 11:33 AM Re: help with mysql to php for hyperlinks (explain inside)
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
See comment on your other thread re putting db connection details on public forums! Re paths, if the infodesign bit is on the db you'll have to update to get rid of it. If it isn't and it's just that your paths begin www.yoursite, prepend "http://" to the db output. Ie make a relative link into an absolute.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


*** New:
Please login or register to view this content. Registration is FREE
PaulW is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to help with mysql to php for hyperlinks (explain inside)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12085 seconds with 12 queries