Jump to content


Photo

Entering TXT


  • Please log in to reply
8 replies to this topic

#1 italkonphone

italkonphone
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 07 June 2006 - 07:38 PM

[img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] :h

uh: i use dreamweaver to edit php , it is a template, im trying to learn and enter more txt on different linesit just wont let me, the code is as follows if anyone can help most appriciated. thanks peeps.

<?php
/*


*/

define('NAVBAR_TITLE', 'About us');
define('HEADING_TITLE', 'About us');
define('HISTORY_TITLE', 'OUR HISTORY');

define('TEXT_INFORMATION', 'We have a simple philosophy, i talk on phone, you talk on phone everyone talk on phone. Thats what we want to see and to get there we make sure we do it so you enjoy the experiance. Its all about i talk on phone');

the above is shown but i can enter anything else as below


define('TEXT_INFORMATION', 'www.italkonphone.co.uk is a online company, that is independant of all the major networks to you the best deal you deserve.');

define('TEXT_INFORMATION', 'www.italkonphone.co.uk is a VIP service for many clients, what defines a VIP, you do with what you do, what you say and how you say it.');

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 07 June 2006 - 07:43 PM

You're reusing the same label in your new defines... try something other than "TEXT_INFORMATION".

Info: PHP Manual


#3 xyph

xyph
  • Staff Alumni
  • Advanced Member
  • 3,712 posts
  • LocationSurrey, BC

Posted 07 June 2006 - 08:23 PM

I would also like to add PHP is a lanuage worth learning outside of dreamweaver. IMO it's far to complex to want to use a WYSIWYG editor.

Your best bet is to use something similar to:

$text_information = 'We have a simple philosophy, i talk on phone, you talk on phone everyone talk on phone. Thats what we want to see and to get there we make sure we do it so you enjoy the experiance. Its all about i talk on phone';

$text_information .= 'www.italkonphone.co.uk is a online company, that is independant of all the major networks to you the best deal you deserve.';

$text_information .= 'www.italkonphone.co.uk is a VIP service for many clients, what defines a VIP, you do with what you do, what you say and how you say it.';

Then simply echo $test_information;
Everything you need to know about storing user-names and passwords
http://www.openwall....Users-Passwords
Blank Page? Try forcing errors to display
ini_set('display_errors',1);
error_reporting(-1);

#4 italkonphone

italkonphone
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 07 June 2006 - 08:32 PM

what is echo lol, ? and ill use notepad i suppose or something.

#5 xyph

xyph
  • Staff Alumni
  • Advanced Member
  • 3,712 posts
  • LocationSurrey, BC

Posted 07 June 2006 - 08:51 PM

There is an amazing number of resources available on the web for PHP beginners. If you really weant to get into dynamic content, it's worth learning to do properly :)

Read up on the php [a href=\"http://www.php.net/echo\" target=\"_blank\"]echo()[/a] command through that link.
Everything you need to know about storing user-names and passwords
http://www.openwall....Users-Passwords
Blank Page? Try forcing errors to display
ini_set('display_errors',1);
error_reporting(-1);

#6 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 07 June 2006 - 08:57 PM

What exactly are you trying to accomplish? Because if you're really trying to use a lot of text then you should use a database to store it, or something like that. If you don't know what echo is then you need to go find a tutorial most likely. At any rate why not just use straight HTML if you are dead set on writing out all that text into variables? seems like it would take less effort and be just as easy to maintain to write:
<p> blah blah blah </p>
as:
$text = "blah blah blah"
echo $text;
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com

#7 italkonphone

italkonphone
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 07 June 2006 - 09:15 PM

i understand echo now but whats happend is its outside the box that i want it in, as above the only statement within the box is define txt_information. is there a way of writing a variable to make it stay within the box ?

#8 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 07 June 2006 - 09:34 PM

What box? Are you referring to CSS? Someone above gave you I think the best advice for this problem, just concatenate by using " .= " so instead of overwriting the variable like you were doing above with multiple definitions, you just stick each new string on the end of the old stuff.

$string = "lots of text";
$string .= " even more text";
$string .= " you get the point"
echo $string;
// outputs
// lots of text even more text you get the point
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com

#9 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 07 June 2006 - 10:24 PM

I agree with the about about using a WYSISYG editor with PHP. It just shouldn't be done ;)

Even with HTML I would not use dreamweaver for. I used dreamweaver in the past but found it not to my liking and just stuck with notepad (back in the day I used simpletext on my mac).

Anyway I use Crimson editor for my PHP and it allows me to learn how the innerworkings... work.. I guess I just like to look at code. Its the insides of thing that fancinate me, not the 'icing on the cake' ;)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users