Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

More php & sql problems


ghost's Avatar
0 0

Yea, im trying to make a CMS okay … Right …. For my navigation system i tried to copy phpfusion's idea …. My table in my db has 5 collums

ID (id) name (text to display for link) link (the location of page to call) pos (Where to place the link ((order))) class (the class used to display the item in)

and this is my code

<?php	
include ("config.".$php)
$result = dbhandle("SELECT * FROM ".$db_prefix."inks WHERE pos<='50' ORDER BY pos");
if (dbrows($result) != 0) {
	while($data = dbarray($result)) {
			if ($data['link_name'] != "---" && $data['link'] == "---") {
				echo "<div class='side-label'><b>".$data['name']."</b></div>\n";
			} else if ($data['name'] == "---" && $data['link'] == "---") {
				echo "<hr class='side-hr'>\n";
			} else {
				if (strstr($data['link'], "http://") || strstr($data['link'], "https://")) {
					<a href='".$data['link_url']."'".$link_target." class='side'>".$data['name']."</a><br>\n";
				} else {
					echo "<a href='".$data['link']."'".$link.". class=".$data['name'].">".$data['name']."</a><br>\n";
				
			}
		}
	}
} else {
	echo "died";
}

?>

I keep getting errors, any ideas … Need any more information … pm me or post here


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

Post the errors you are getting, and also, where is the variable $php declared? As you are using: include ("config.".$php)


spyware's Avatar
Banned
0 0

I glanced over the code and I came to one conclusion: You don't have any fucking clue what you're doing.

Stop trying to do something you cleary can't. First **learn **PHP and SQL and then create something with it. IN THAT ORDER!


ghost's Avatar
0 0

ah sorry system …. i missed out a link

include ("extenison.inc") <– my extensions are all in there But i still have errors =

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\navigation.php on line 13


ghost's Avatar
0 0

whopps … fixed that last error .. and now > Fatal error: Call to undefined function dbhandle() in C:\xampp\htdocs\navigation.php on line 4

But that is in my config.php file for deffo


spyware's Avatar
Banned
0 0

<a href='".$data['link_url']."'".$link_target." class='side'>".$data['name']."</a><br>\n";

should be echoed.


ghost's Avatar
0 0

spyware wrote: <a href='".$data['link_url']."'".$link_target." class='side'>".$data['name']."</a><br>\n";

should be echoed.

yea i changed that … still have errors .. read above ^

djdotti wrote: whopps … fixed that last error .. and now > Fatal error: Call to undefined function dbhandle() in C:\xampp\htdocs\navigation.php on line 4

But that is in my config.php file for deffo

my latest error : Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\navigation.php on line 4


spyware's Avatar
Banned
0 0

We are no debugging tool you … tool! Go study your PHP first and then ask questoins.

Sheesh..


ghost's Avatar
0 0

I came here for help … advice … not to be shouted at by you … I'm focing no-one to be a debugging tool, simply asking for help on my problem ….. "sheesh"


spyware's Avatar
Banned
0 0

djdotti wrote: I came here for help … advice … not to be shouted at by you … I'm focing no-one to be a debugging tool, simply asking for help on my problem ….. "sheesh"

Your problem is you have no fucking clue of what you're doing. I gave you good advise, if I were you I would take it.

Sheesh²…


ghost's Avatar
0 0

…… Im learning alright … And I am testing scripts as I learn …. and every now and then try editing some for fun … etc….

Sheesh …


spyware's Avatar
Banned
0 0

Stop trial and erroring your ass to your free hosting account and back here. If you want to help, start helping yourself by learning something before attempt to do things that you clearly don't understand.


ghost's Avatar
0 0

spyware wrote: Stop trial and erroring your ass to your free hosting account and back here. If you want to help, start helping yourself by learning something before attempt to do things that you clearly don't understand.

ACTUALLY … I am using Xampp server on my machine … if you didnt notice half of my errors included a path to c:\Xampp\…etc.

…. SO .. i suggest you read and think before insulting and shouting at people who dont do exactly as you'd like them to. Sheesh…


spyware's Avatar
Banned
0 0

Completely offtopic you tard. That doesn't fucking matter. You know what, the only problem is YOU, if YOU knew how to program in PHP then YOU could fix the errors/stop copying code.

So YOU should dash over to W3schools or whatever, and start learning what YOU got to do.

And now stfu.


ghost's Avatar
0 0

…..:vamp: I no-longer like you …. IM ASKING FOR HELP .. for goodness sake ….. if your not going to give it to me then stop posting insults ….. Sheesh


richohealey's Avatar
Python Ninja
0 0

Ok.

Both of you: ** Shut the FUCK UP**

Spyware, he's just trying to do his best.

Dj_Dotti: Spyware is right. you're no where near ready for a project like this.

Now play nice kids


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

djdotti wrote: whopps … fixed that last error .. and now > Fatal error: Call to undefined function dbhandle() in C:\xampp\htdocs\navigation.php on line 4

But that is in my config.php file for deffo

Show me your config file, but * out your sensitive info, then I might be able to help.


ghost's Avatar
0 0

<?php // database settings $hostname="localhost"; $username=""; $password=""; $database="dotticms"; $con = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); mysql_select_db($database, $con); ?>


spyware's Avatar
Banned
0 0

richohealey wrote: Ok.

Both of you: ** Shut the FUCK UP**

Spyware, he's just trying to do his best.

Dj_Dotti: Spyware is right. you're no where near ready for a project like this.

Now play nice kids

Hm, I don't see any additional value in your post, actually, you've just copied my statement and told me to shut the fuck up also.

Way to go richo, way to fucking go.

cheers

And now lets see if system is actually going to help djdotti.

watches


ghost's Avatar
0 0

spyware, stop throwing your ego around like a little girl and try to help him. its a question forum, for gods sakes, not a PHP pro forum. you dont learn if you dont make mistakes and learn how to fix them. but i also agree with you, dotti you should start with a smaller project to get you going, like a single script or something, not a CMS.


richohealey's Avatar
Python Ninja
0 0

Spyware: I'm not interested in fighting about this.

The fact is that you said the same thing through about 5 posts, and while you are DAMN RIGHT, there was no need to keep dumping on him.


spyware's Avatar
Banned
0 0

mr noob wrote: spyware, stop throwing your ego around like a little girl and try to help him. its a question forum, for gods sakes, not a PHP pro forum. you dont learn if you dont make mistakes and learn how to fix them. but i also agree with you, dotti you should start with a smaller project to get you going, like a single script or something, not a CMS.

I could help him, by giving him advise. GUESS WHAT, THAT'S WHAT I DID! [/caps] I told him to learn PHP before attempting to make a CMS, I told him HBH board was no debugging tool, I told him to go to w3schools.

But noooooo, lets ignore all the advise and start flaming on spyware, because he is noob unfriendly.

sob

Get outta here, seriously.


ghost's Avatar
0 0

what im trying to say is dotti is making an effort so stop flaming. i just dont think its necessary tbh. im not flaming you, i just think its pointless telling someone theyre an idiot and should go learn more before trying something.


spyware's Avatar
Banned
0 0

mr noob wrote: what im trying to say is dotti is making an effort so stop flaming. i just dont think its necessary tbh. im not flaming you, i just think its pointless telling someone theyre an idiot and should go learn more before trying something.

LMAO, EFFORT?!

"Djdotti created a hbh thread and asked for help, after a while he even posted his error messages. Guess what, the original code was 'based' (ctrl-c) on php-fusion code"

Yea, effort.

define:effort

attempt: earnest and conscientious activity intended to do or accomplish something; "made an effort to cover all the reading material"; "wished him luck in his endeavor"; "she gave it a good try"

THAT'S EFFORT. [/caps]


ghost's Avatar
0 0

well i dont use php-fusion so i wouldnt know that would i?


spyware's Avatar
Banned
0 0

mr noob wrote: well i dont use php-fusion so i wouldnt know that would i?

Read his first post.


ghost's Avatar
0 0

i didnt realise he had literally copy pasted the code but hey.


spyware's Avatar
Banned
0 0

mr noob wrote: i didnt realise he had literally copy pasted the code but hey.

Hey, if he doesn't understand the error messages, he didn't code it himself. OR he would have a logical explanation why he doesn't understand his errors.


ghost's Avatar
0 0

i dont understand my errors sometimes, php can be gay like that :/


ghost's Avatar
0 0

I have EDITED the script from php-fusion only slightly though but i do, still, really need the help … Please … Im building on my Project everytime i learn something new … But I dont even have a basic database driven navigation system yet … So … Please … Can we stick to my topic and help me … Please … I would be very greatful, as soon as I get this script I promise to get w3 schools on my bookmarks toolbar and learn … but for now please.


ghost's Avatar
0 0

wow…that…is…a…lot…of…ellipses!

anyway, cut the crap with the arguing. if you can help him, help him. otherwise shut up. as fun as flaming is, there's no point. im sure he has looked on w3schools and the likes and is stuck. so yeah, dont talk the talk if you cant walk the walk. i dont think that statement was actually needed but oh well.

^ now THAT is a hypocritical post.


ghost's Avatar
0 0

I agree that djdotti should start off with some smaller stuff… I mean I've known (to a certain extent, still crappy IMO) PHP for about 4-5 months now and my website still uses only 3 tables in it's database… But it works having all the code done by myself (except a bb2html function) and all the errors fixed by myself… And as far as I know is secure (which I suppose isn't hard with 3 tables)


ghost's Avatar
0 0

Is ANYONE … gonna eventually help me