More php & sql problems
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
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 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…
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
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.
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.
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]
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.
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.
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)