Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 9th, 2004, 5:43 AM   #1
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
Well,
I am having an issue here. My signature holds "my latest project" and if you go there, you will see that I have everything set up in a messy little table, where the left side is some static information and the right side is my navigation area and then the middle is the content.

Major issue in this one is, that as I am constantly making changes to this site there are going to need to be changes made to the link side and the static stuff on the left.

I am calling both from database fields and want to change each thing as I go along, for certain reasons. Considering the holidays, or what have you, certain promotional things, this sort of thing.

Ok, laying way too much ground work here, but the main problem is that the way it is all called is through html, however, when I type the HTML into my form and send via PHP/MYSQL, all I am left with is the text itself, and none of my tags.

I have read that there is something that needs to be changed in PHP.INI, but, that is another problem. I have no controll over the host at all.

Any suggestions?
Thanks
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this "frame" situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Oct 9th, 2004, 4:38 PM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Why are you putting html into the database?? Instead of putting the html into a database, why not code the html into the pages (your tables and non-content stuff), then store the text and images in the database. That way when you want to change somthing in the page all you'd have to do is change the text or images in the database. You'd also be grabing less data out of you database, which in turn would possibly speed your page load times. I hope you have some kind of backend for your page and your not planing to do your updating through database insert commands. That's alot of typeing. Anyways, that's my two cents.


If you're still wanting to put html into the database, why not post some code so i or somebody else can see what's going on?
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Oct 9th, 2004, 5:25 PM   #3
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
That's actually a great idea,
I might have thought of that, if I hadn't been up late most nights, trying to grasp the whole PHP, MYSQL thing.

I can make a table for the left, and a table for the right, and then call the entries as I need them within the HTML layout,

Thanks, I don't know why I asked a question with such a simple solutiont.
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Oct 9th, 2004, 6:23 PM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Hey man, that what we're here for. Glad that i could help out.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Oct 10th, 2004, 12:14 AM   #5
BlazingWolf
Hobbyist Programmer
 
Join Date: Sep 2004
Posts: 207
Rep Power: 4 BlazingWolf is on a distinguished road
Thats still the not easiest way to do it. The best way to do it is to use a SELECT..CASE series and pass the varible through the url. Like...

http://www.mysite.com?page=home

Then you set it up so the middle of your page or wherever your going to keep the bulk of your text, and images uses a SELECT..CASE statement to include the page passed in the url. This way when you want to update links or images outside of the middle you only have to change one page and the 'whole site' has changed.

What I just say may make very little sense to you though so i'm going to give you the code.

 * <?php
 * error_reporting(~E_NOTICE);//This is important because it will give you a warning all the time unless you do this.
 * $_GET['page'];
 * switch($_GET['page'])
 * {
 * *default;
 * *include("news.php");
 * *break;
 * *case"games";
 * *include("games.php");
 * *break;
 * * }
 * *
 * *?>

And a link would look like this.

<a href="?page=news">Home</a>

Now this way doesn't include the use of a database but it's much easier and more senseable(no insult intended).

Hope that helps you out.
__________________
_______________________________
BlazingWolf
BlazingWolf is offline   Reply With Quote
Old Oct 10th, 2004, 11:46 PM   #6
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
Blazingwolf.

What you are suggesting here is that I use something like 2 external pages, one for the left side and one for the right side? or are you more suggesting that the whole thing be one page where, based on what link is pressed, the content is replaced with the new content?

Seems to be that you are almost suggesting an inline frame situation similar to what HTML offers, but I may be mistaking, as I have said, I am sort of just getting started in the dynamic world of PHP...

The problem is that ultimately, I am going to be making changes on a pretty regular basis, and truely, the time that it took to get the site to the point where it is now, really was more then I thought it would be.

The reason I felt it might work best to usethe database for the leftside info and the links on the right, is only because if I want to change the link information or the left information, I can simply just make a few changes to the database entry.

I wish I could figure a way to simplify writting the content as well, but, up to now I have had no luck there, since I can not figure out how to use html in the database, though, I have not yet tried the IsHTML expression that has been successful with my email script.

It's getting hairy, but fun..lol..

If you could explain your method for me in such a way that you would a 10 year old (as, I really am struggling some with php) I would greatly appretiate it. I guess I am not sure what the main concept is in your code.

Thanks a ton for all of your help.
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Oct 11th, 2004, 2:39 AM   #7
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
I think I figured something out, that would be easy, but, it isn't working the way that I want it to.
I am trying to use the "include", sort of the way you do with style sheets.
So far on the index.php I am doing the following
<? 
include("http://www.psychicscorpio.com/include/rightleft.php");
	$learn_links;
?>
In the head tag. Due to a few errors that I have gotten before hand, I know that it is pointing to where the include file is. I have gotten a few errors in regard to my include file.

To call the information in my include file I used the following
<? 
$learn_links; 
?>

the problem is that I have done several things with the include file. Since I am just making links, I have tried using a for statement, Wich of course didn't work because I am only using one expression, for is for multiple expressions. Then I tried the IF statement, but, that can't work iether, logicly at least.
I have tried multiple other things as well, but, I just can't seem to make it work.
Here is my include file with the latest thing I have tried. At least you can get an idea of what it is I am trying to do.
<? 
$learn_links = echo "<a href=\"http://www.psychicscorpio.com/learn/tarot/\">Home</a><br><a 

href=\"http://www.psychicscorpio.com/learn/numerology/\">Numerology</a><br><a 

href=\"http://www.psychicscorpio.com/learn/dream/\">Dreams</a><br>;
 


?>

Is there any way that someone can tell me, what is wrong with this, and tell me how to fix it?... I am hoping, instead of alternative methods, that someone could just work with the method that I am trying to use, and tell me where I am going wrong with this method in particular.
If at all possible, be as detailed as you can, so that I can grasp the language, it's been a tough struggle with PHP for me (have no clue why).
Thanks in advance.
Mike.
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Oct 11th, 2004, 12:44 PM   #8
BlazingWolf
Hobbyist Programmer
 
Join Date: Sep 2004
Posts: 207
Rep Power: 4 BlazingWolf is on a distinguished road
I'll make a little drawing.

Header blah blah
----------------------------------------
| | Body | |
| text | |text |
| in | included file | in |
| index| | index|
| file | | |
| | | |
| | | |
| | | |

EDIT: Well that was useless because the spacing doesn't stay.

So all the side bar HTML, and PHP ect, is in your index.php file. So if you want to change something in one of the side bars you just have to change it in the index.php file. Then the middle uses the switch..case deal to include the right file. The included files don't have the sidebars or header or anything they just include whatever you want in that middle area. This does work very much like an inline frame except is not nearly as cumber some because you don't need to do all that 'target=blah' crap.


the way I do this is I uses a big table and use in-line PHP to put the switch...case command in the middle column. If an example would help. http://dojo.motionless-continuum.com/

In that the box where all the news is uses a PHP include and when you click a different link it loads a different page into that box.
__________________
_______________________________
BlazingWolf
BlazingWolf is offline   Reply With Quote
Old Oct 11th, 2004, 6:41 PM   #9
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
Blazing,
I am deffinately with you here, and now I get it... even though you say it didn't come out spaced the way you wanted it to, it makes sense to me the way you put it.

I figured out what I did wrong with the code I just posted too, and let me just say "Duh" ..lol. I just had the syntex completely wrong

THis actually works now as follows.
My include file
<? 
$learn_links = 
'<a href="http://www.psychicscorpio.com/learn/tarot">Tarot</a><br>
<a href="http://www.psychicscorpio.com/learn/numerology">Numerology</a><br>
<a href="http://www.psychicscorpio.com/learn/dream">Dreams</a><br>';
 


?>

And in the file that I want this to all appear into was way wrong. Instead of the include statement being in the head, it should have been placed in the body, in the same place that I wanted it to all appear.
<? 
include 'rightleft.php';
	echo "$learn_links";
?>
and that works, from fixing the syntex and where I place everything, it calls it the way I need it to.

I would put "solved" in this thing, but I still can't figure out how to tell people it is solved.
Thanks a bunch all
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Feb 4th, 2005, 1:57 AM   #10
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
Not as solved as I thought it was.

New project, same problem, same question.

Hopefully, someone will read this even though it says solved, and I can't figure out how to change the thread name anymore, under the new layout.

Now, I am going to create a new website, that allows users to have a profile page. There information text should be able to include html for this project.

I have been told, on numerous occasions, that, putting HTML into a MYSQL database from a php or html form is impossible, however, I know that there is no way that it is impossible, simply because of the fact that PHPmyadmin, is a PHP page, and you can insert html into their formfields, and it will produce the html.

In fact, I have seen this in a number of places, but, I am not exactly sure how to do it.
Is it possible, that I might have to create some sort of code that says wherever you see an html character, you need to convert it to another symble?

I am not sure, because when I go back and look at the database it does show the html as I wrote it in?

I have no code to paste, because, well, I have no clue about how to do it.

Thanks.
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:18 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC