This is a discussion on "Web template" within the Web Page Design section. This forum, and the thread "Web template are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Web template
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Web template
Hi
I would be greatful if someone could offer advice regarding redesigning my website. I am trying to create a template to display a vertical and horizontal menu that is consistent throughout the site, would asp be best for this? Also I have uploaded my 10,000 products I intend to sell on the site to mySQL on my host. How would I access each page displaying the categories field of the database and how would that fit into the template. Would it be possible to change the page by using variables in PHP of a link or search from in the search box. Sorry I know its a lot of questions but I am pushed to find answers to these questions. If I have got it completely wrong please let me know. |
|
|
|
#2
|
||||
|
||||
|
Re: Web template
use php includes for the menu throughout the site.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#3
|
|||
|
|||
|
Re: Web template
great thanks for your comments. should i stay away from frames or are they still regarded as ok.
|
|
#4
|
||||
|
||||
|
Re: Web template
they are regarding as anything but okay!
we hate them wait there, i'll copy and paste the the reasons again
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#5
|
||||
|
||||
|
Re: Web template
here we go
Quote:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#6
|
|||
|
|||
|
Re: Web template
Gotcha...frames are bad...loud and clear! thanks alex
|
|
#7
|
||||
|
||||
|
Re: Web template
your welcome good luck with the site.
any other questions?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#8
|
|||
|
|||
|
Re: Web template
Sorry. One more thing how do you enter speech marks into php for example it wont accept:
echo "<img src="image.gif" >"; or should it be: echo "<img src='image.gif'>"; thanks |
|
#9
|
|||
|
|||
|
Re: Web template
I think you have to escape them so something like this:
Pete. |
|
#10
|
|||
|
|||
|
Re: Web template
I'll give that a go thanks
|
|
#11
|
||||
|
||||
|
Re: Web template
A pedantic point but when you're echoing html with PHP it is better (faster) to use single quotes unless you plan to embed variables in them.
With single quotes php will simply output the text but with double quotes it checks the whole string to see if anything needs interpreting before outputting. As pa007 says you do have to escape single quotes with \' Cheers.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#12
|
|||
|
|||
|
Re: Web template
thanks for that rakuli. I started coding my new site last night and was amazed that creating templates for menus and headers in php is so easy. cant believe I didnt do it last time.
|
|
#13
|
||||
|
||||
|
Re: Web template
totally agree with you.
i love php and how easy it is. i got so cocky, i tried a new language like java. and was pretty disappointed when i couldn't even do the hello world tut
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#14
|
|||
|
|||
|
Re: Web template
Quote:
Will it cause problems across other browsers without escaping. i am currently using firefox. Chris |
|
#15
|
||||
|
||||
|
Re: Web template
If you're surrounding everything with single quotes the only thing you need to worry about escaping is single quotes.
echo 'I\'m going to have to escape that apostrope'; When you're using double quotes there are a few more special characters to take into account but you normally only have to escape double quote's echo "Rakuli said \"Using single quotes in double quotes isn't a problem\""; You won't experience any browser problems because you won't get that far echo 'this format'; rather than echo "this format"; when echoing a lot of HTML simply because php does it a little quicker You may not be aware that you can also "break out" of PHP completely when you don't need to use any code. <?php echo '<b>Hello', $username, '</b>'; ?> <p>From here on in I don't need to worry about quotes at all. Hope that helps.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#16
|
|||
|
|||
|
Re: Web template
Something to mull over thanks for the advice.
|
|
#17
|
|||
|
|||
|
Re: Web template
Me again...When you send a variable to a php file how long will that variable last for is it when the user navigates away from the page or is it when the browser is closed or different.
Thanks |
|
#18
|
||||
|
||||
|
Re: Web template
it will only last as long as that particular script
to pass variable about there are various methods. i'm assuming this is a sort of login system or something else so best to use $_SESSION a bit of googling will get you there.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Tags |
| asp, mysql, php, template |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Template I have bought from template-design.info | suggestion | Flash & Multimedia Forum | ||