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.

Coding Forum


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



Reply
Old 08-25-2002, 08:13 PM okay I need help...
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
Why is this doing this? Look at the Featured Link
http://conundrum.listcraze.com/ccc/index.shtml


The PHP script is only supposed to print the link and the text not all that other stuff.

I didn't want to change all my pages to PHP extenstions so I used a SSI to call the file from linkr.php

Any thoughts appreciated.

It seems not to matter that I used SSI to call it. Here is the link to the PHP page itself and all that text is still showing up

http://conundrum.listcraze.com/ccc/linkr.php

__________________

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



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

Last edited by HeidiLynn; 08-25-2002 at 08:17 PM..
HeidiLynn is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-25-2002, 08:18 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
dont know too much about ssi so cant help you too much on this one
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 08:29 PM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
Quote:
Originally posted by fonzerelli_79
dont know too much about ssi so cant help you too much on this one
well it has nothing to do with the SSI, look at the php page.
__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 09:49 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
ive had a look

i know how to include php files using include("file.php");

can you show us exactly what code youve used
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 10:13 PM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
Quote:
Originally posted by fonzerelli_79
ive had a look

i know how to include php files using include("file.php");

can you show us exactly what code youve used
The whole script can be had for free here:
http://www.holotech.net/scripts.html

It is called LinkCycle V2.0

the code given in the readme to include it in the PHP page was this:
<?php include("linkcycle.php3") ?>
__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 10:22 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
replace that with

<?php include("linkcycle.php3"); ?>

notice the ;

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 10:36 PM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
okay I did but it is still showing all that extra stuff. *sigh*

Thank you for trying to help though.
__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 10:39 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
not too sure about that script

but look at my site http://www.affiliate-review.com - down the bottom of the centre column of every page is a box called random review - this does exactly what you want it to do

do you want me to help you add something like this
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 10:49 PM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
Thanks, I did email the guy who wrote script and waiting on a reply from him.

I also want to ask him if it is possible to make the link open in a new window.

I am reasonably sure the problem is in the script itself but I am not as familiar working with PHP as I am with CGI. If this were a CGI script I could spot the problem in seconds.

I know I will eventually be that comfie with PHP but I am not at the moment

__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 11:08 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
right i will assume that you have phpmyadmin or something similar on your server and you know how to add tables etc to a mysql database

first create a table in your database - call it anything you want though something descriptive would be best

we'll call the table featured_link
this table will have 4 fields

id - integer
link_name - varchar or text
link_url - varchar or text
link_details - text

next create a php file called dbconnect.php
Quote:
<?php
mysql_connect(localhost, database_login, database_pass);
mysql_select_db("database_name");

?>
you will have to edit this short file to suit your database

database_login is the login name to access your database
database_pass is the password to login with
database_name is the name of the database

next we need to create a short script that you can include in any of your pages though the page will have to use a .php extension - not sure if you wanted this or not


Quote:
<?php
include "dbconnect.php";
$query = mysql_query(" SELECT * FROM `featured_link` ORDER BY RAND()");
$result = mysql_fetch_array($query);
$name=$result['link_name'];
$url=$result['link_url'];
$details=$result['link_details'];

echo "<b>Featured Link</b><br>";
echo "<a href=\"$url\"><b><font color=\"#ff0000\">$name</font></b></a> - $details";

mysql_close();
?>
edit the above code to suit your needs

this is a very simple script and i know it uses php extensions which im not sure you want but it does work

hope this helped
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 11:29 PM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
yeah it kinda did but like I said I really don't know much about PHP.

For the table do I put the word integer or a number or what?

I feel so totally stupid when it comes to PHP
__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 11:31 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
no you made the id field int

how did you install the other script - did you just upload a text file or did you create the table yourself

if you uploaded a text file then ill create it for you using the above info
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 11:35 PM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
Quote:
Originally posted by fonzerelli_79
no you made the id field int

how did you install the other script - did you just upload a text file or did you create the table yourself

if you uploaded a text file then ill create it for you using the above info
Everything was pre-made and the table info was a php3 file that I was instructed to run after I installed the scripts and then delete it when done.

I am still a mucho beginner to PHP but I would hate for you to go to all that trouble because this script really has the complexity that I want.

I just wish it worked right.

__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-25-2002, 11:39 PM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
dont be silly mate thats what the sites for - also, im just beginning to learn php and the best way to learn is to try and explain it to someone else

i really dont how to make an installer though ill have a look at that script and see if i can amend it

not sure if i will be able to do it though ill give it a shot
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-26-2002, 12:02 AM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
ive just thought of someone

i dont know how to make an admin panel or whatever so youd have problems adding links to the database

do you know if you have access to phpmyadmin because i could set it up very quickly if you do and show you what you have to do
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Old 08-26-2002, 12:15 AM
HeidiLynn's Avatar
King Spam Talker

Posts: 1,122
Trades: 0
Yeah I do but I think I am just going to dig into this script and see if I can find the problem.

That was part of how I became so good working with cgi so I should start learning sometime.

Thank you so much Fonzi for all your help. It is very appreciated
__________________

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



Please login or register to view this content. Registration is FREE
HeidiLynn is offline
Reply With Quote
View Public Profile
 
Old 08-26-2002, 12:17 AM
fonzerelli_79's Avatar
Webmaster Talker

Latest Blog Post:
11 Free Twitter Clients
Posts: 731
Location: Sunny Scotland
Trades: 0
no problem mate

good luck with it and let me know how you get on
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
fonzerelli_79 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to okay I need help...
 

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.48203 seconds with 12 queries