T-String align?
Moderator: General Moderators
-
Trishalyn229
- Forum Newbie
- Posts: 4
- Joined: Tue Oct 12, 2004 12:13 am
T-String align?
Can someone tell me how to align a t-string?
-
Trishalyn229
- Forum Newbie
- Posts: 4
- Joined: Tue Oct 12, 2004 12:13 am
twigletmac | Help us, help you. Please use
The problem is, the text in the echos is appearing underneath the header instead of being down where the content should be. I'm trying to find out how to align the text to where I need it to be.
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
@ G-string
Maybe I didn't word it right. This is my code:Code: Select all
<? } elseif ($action == "join"){
if (!isset($_POST[name]) || !isset($_POST[email]) || !isset($_POST[country])) {
echo "<H2>Thanks</H2><P>Thank you for joining the Sarah Martin fanlisting. You will be added to the member list as soon as possible.</P>";
} elseif (empty($_POST[name]) || empty($_POST[email]) || empty($_POST[country])) {
echo "<H2>Error</H2><P>Oops, it appears you forgot to enter either your email address, your name or your country. Please press the BACK button in your browser and try again.</P>";
} else {if i understand correctly... instead of echo u need to put the strings into a var and then echo the variable where u want it to b...
Code: Select all
<?php
$str = "<H2>Thanks</H2><P>Thank you for joining the Sarah Martin fanlisting. You will be added to the member list as soon as possible.</P>";
?>Code: Select all
<?php
echo $str;
?>-
Trishalyn229
- Forum Newbie
- Posts: 4
- Joined: Tue Oct 12, 2004 12:13 am
assing your message to a var like
then later in your page where you want the message to appear.
so your message will appear where you want it and only if the variable $msg has been used otherwise nothing will appear.
BTW who is Sarah Martin? As that is my sister name as well.
Code: Select all
<?php
if($succesful)
$msg="congrats on joining";
else
$msg="you forgot something";
?>Code: Select all
<?php
<html>
<head>
<title>Sarah Martin fan club</title>
</head>
<body>
some other content that you have
<?php if(isset($msg)) echo $msg; ?>
some more content
</body>
</html>
?>BTW who is Sarah Martin? As that is my sister name as well.
-
Trishalyn229
- Forum Newbie
- Posts: 4
- Joined: Tue Oct 12, 2004 12:13 am
Sarah's a singer from L.A. ;0) She's about to put out a single, etc.
http://www.sarahmartin.org
Thanks...I'm gonna see if that works. I'm trying to use phpfanbase, and this is my first real crack at php.
http://www.sarahmartin.org
Thanks...I'm gonna see if that works. I'm trying to use phpfanbase, and this is my first real crack at php.