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.

PHP Forum


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



Freelance Jobs

Reply
Old 12-25-2010, 07:24 PM Coding Help
Novice Talker

Posts: 6
Trades: 0
Hello there could anyone help me solve this coding problem i have been faced with? onlinetemplatemaker.com is a simple template generator atm, i currently have it supplying the code on the next page but on the next page i have a problem <title> ". $_SESSION["name"] . "</title> where it says
". $_SESSION["name"] . " its ment to display the previous info that was inputted on the last page but thats the problem can anyone help me... my code looks like this.. well part of it...
Code:
<form name="select"> <textarea id="testarea" rows="100" cols="400">'; 

echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> ". $_SESSION["name"] . "</title>
<style type="text/css">
body {
	background-image: url(http://www.onlinetemplatemaker.com/templates/images/template1.gif);
	background-repeat: no-repeat;
	background-position:top center;
	font-family: Tahoma, Geneva, sans-serif;
	font-weight: bold;
	text-align: left;
	color: #000;
	background-color: #000;
}
#Font {
	font-family: Tahoma, Geneva, sans-serif;
	text-align: center;
	color: #FFF;
}
#Mainmenu {
	color: #FFF;
}
</style>
</head>
 
<body>
<center> 
<table width="900" border="0">
<tbody>
<tr>
<td><b id="Font"><b>". $_SESSION["name"] . "</b></b></td>
</tr>
</tbody>
</table>
<table width="900" border="0">
<p>
blahblahblah
can anyone help me if you understand i have seemed to have just mumbled on.

Last edited by chrishirst; 12-25-2010 at 07:37 PM..
matt0268 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-25-2010, 07:35 PM Re: Coding Help
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Change:


PHP Code:
<title". $_SESSION["name"] . "</title
to


PHP Code:
<title'. $_SESSION["name"] .'</title
Note i changed:
<title> ". $_SESSION["name"] . "</title>
to
<title> '. $_SESSION["name"] . '</title>
__________________

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

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


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 lynxus; 12-25-2010 at 07:39 PM..
lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 12-25-2010, 07:38 PM Re: Coding Help
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Ill explain...

You started the echo with ' rather than "

So when you used ". $var ." it was ignored as you used ' to start and "end" your echo..


Ie:
Because you started it with ' you need to use '. to append to it.. This closing and .' opening the echo again..

Thanks
G
__________________

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

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


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

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


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 12-25-2010, 07:41 PM Re: Coding Help
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
OH and instead of echoing the whole HTML doc... you could do this:


PHP Code:
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> <?php echo $_SESSION["name"]; ?> </title>
<style type="text/css">
body {
    background-image: url(http://www.onlinetemplatemaker.com/templates/images/template1.gif);
    background-repeat: no-repeat;
    background-position:top center;
    font-family: Tahoma, Geneva, sans-serif;
    font-weight: bold;
    text-align: left;
    color: #000;
    background-color: #000;
}
#Font {
    font-family: Tahoma, Geneva, sans-serif;
    text-align: center;
    color: #FFF;
}
#Mainmenu {
    color: #FFF;
}
</style>
</head>
 
<body>
<center> 
<table width="900" border="0">
<tbody>
<tr>
<td><b id="Font"><b>". $_SESSION["name"] . "</b></b></td>
</tr>
</tbody>
</table>
<table width="900" border="0">
<p>
blahblahblah
__________________

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

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


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 lynxus; 12-25-2010 at 07:42 PM..
lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 12-25-2010, 07:43 PM Re: Coding Help
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by lynxus View Post
Change:


PHP Code:
<title". $_SESSION["name"] . "</title
to


PHP Code:
<title'. $_SESSION["name"] .'</title
Note i changed:
<title> ". $_SESSION["name"] . "</title>
to
<title> '. $_SESSION["name"] . '</title>

Thankyou i cant believed i missed that when looking back at it, And thanks for making me understand.

Last edited by matt0268; 12-25-2010 at 07:46 PM..
matt0268 is offline
Reply With Quote
View Public Profile
 
Old 12-25-2010, 07:48 PM Re: Coding Help
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by lynxus View Post
OH and instead of echoing the whole HTML doc... you could do this:


PHP Code:
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> <?php echo $_SESSION["name"]; ?> </title>
<style type="text/css">
body {
    background-image: url(http://www.onlinetemplatemaker.com/templates/images/template1.gif);
    background-repeat: no-repeat;
    background-position:top center;
    font-family: Tahoma, Geneva, sans-serif;
    font-weight: bold;
    text-align: left;
    color: #000;
    background-color: #000;
}
#Font {
    font-family: Tahoma, Geneva, sans-serif;
    text-align: center;
    color: #FFF;
}
#Mainmenu {
    color: #FFF;
}
</style>
</head>
 
<body>
<center> 
<table width="900" border="0">
<tbody>
<tr>
<td><b id="Font"><b>". $_SESSION["name"] . "</b></b></td>
</tr>
</tbody>
</table>
<table width="900" border="0">
<p>
blahblahblah
That will help a lot cheers.
matt0268 is offline
Reply With Quote
View Public Profile
 
Old 12-25-2010, 07:50 PM Re: Coding Help
Novice Talker

Posts: 6
Trades: 0
One last thing if you could help, how could i put a select all button into the textarea or a copy to clipboard button?
matt0268 is offline
Reply With Quote
View Public Profile
 
Old 12-25-2010, 07:57 PM Re: Coding Help
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Quote:
Originally Posted by matt0268 View Post
One last thing if you could help, how could i put a select all button into the textarea or a copy to clipboard button?


Thats something for javascript i would suspect and i cant help much with that " im useless at JS "

Maybe start a new thread in the JS forum
__________________

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

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


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

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


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 12-25-2010, 07:58 PM Re: Coding Help
Novice Talker

Posts: 6
Trades: 0
Quote:
Originally Posted by lynxus View Post
Thats something for javascript i would suspect and i cant help much with that " im useless at JS "

Maybe start a new thread in the JS forum
Ill guess i'll give it ago trial and error for abit see how it goes thanks for all help anyways.
matt0268 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Coding 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.29691 seconds with 12 queries