Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [PHP/MySQL] I'm new at this...please be nice (https://thetfp.com/tfp/tilted-technology/61010-php-mysql-im-new-please-nice.html)

FaderMonkey 06-30-2004 02:32 PM

[PHP/MySQL] I'm new at this...please be nice
 
I'm getting this error:

Quote:

Parse error: parse error, expecting `','' or `';'' in /home/dtlott/public_html/test/index4.php on line 100
For this line of code:

Quote:

echo "<font face="skia"><b>$entrytitle</b></font>";
It's only happening when I use those FONT tabs. When I take them out, it's fine. Am I not allowed to use those there?

SinisterMotives 06-30-2004 02:37 PM

You need to escape double quotes with backslashes in a string you declare between double quotes:

Code:

echo "<font face=\"skia\"><b>$entrytitle</b></font>";

SinisterMotives 06-30-2004 02:39 PM

By the way, your HTML is obsolete. Do this instead:

Code:

echo "<span style=\"font-family: skia, sans-serif; font-weight: bold;\">$entrytitle</span>";

FaderMonkey 06-30-2004 02:43 PM

Thank you, thank you, thank you!! I'm just learning how to do this and I read about that a couple days ago. I should have known that.

Thank you again!

FaderMonkey 06-30-2004 02:46 PM

What's the difference between using these two?

Quote:

echo "<font face=\"skia\"><b>$entrytitle</b></font>";

and

echo "<span style=\"font-family: skia, sans-serif; font-weight: bold;\">$entrytitle</span>";

SinisterMotives 06-30-2004 03:53 PM

The difference is that the latter should continue to work in new browser versions for a long time to come, while the former will presumably stop working at some point. That applies mainly to the font tags. The bold tags will probably be always be valid. Moreover, you can eliminate bloated code by putting the font properties in a CSS class and replacing the style attribute with a class attribute in all elements that you want to apply those style rules to.

MrFlux 07-01-2004 02:42 PM

By the way, if you're using a colour highlighting editor, this would probably be easier to read:

PHP Code:

<?php
echo '<span style="font-family: skia, sans-serif; font-weight: bold;">'.$entrytitle'.</span>';
// as opposed to
echo "<span style=\"font-family: skia, sans-serif; font-weight: bold;\">$entrytitle</span>";
?>

But whatever you want to use as long as you remember to only use double quotes if you want the string parsed for variables, otherwise ' is faster.

RelaX 07-01-2004 03:08 PM

So how is this MySQL related?

SinisterMotives 07-01-2004 03:50 PM

Quote:

Originally posted by MrFlux
By the way, if you're using a colour highlighting editor, this would probably be easier to read....
I'm using UltraEdit32. It highlights a lot of languages, but PHP isn't one of them. I can get some highlighting if I set it to highlight PHP as Perl, but it's hit-and-miss. Is there an add-on PHP language file for UltraEdit?

sailor 07-01-2004 04:03 PM

I would suspect so, but I cant comment on it... I do know that TextPad has a PHP syntax file though.

Maybe look at http://sourceforge.net/projects/php4ue/

SinisterMotives 07-01-2004 04:11 PM

Thanks, Sailor. That looks like it's exactly what I want. :)

MrFlux 07-01-2004 04:30 PM

Crimson Editor has built in PHP support.

I'm currently using Nusphere PHPEd, which is really nice apart from a few bugs, although my trial is about to run out.

sailor 07-02-2004 05:44 AM

Yeah, I have yet to find a *really* good php editor. TextPad does fine, and I have been using it a lot, but it is a text editor, not a full fledged IDE. Dreamweaver is terrible, so thats out, and Im not going to pay $200 for Zend. Guess Im sticking to textpad :(

SinisterMotives 07-02-2004 11:20 AM

I'm not giving up UltraEdit either. It's the best text editor I've ever used, and I've gotten familiar with most of the features. I'd never even consider a WYSIWYG editor like Dreamweaver or Front Page.

SiN 07-02-2004 11:59 AM

Quote:

Originally posted by SinisterMotives
I'm using UltraEdit32. It highlights a lot of languages, but PHP isn't one of them. I can get some highlighting if I set it to highlight PHP as Perl, but it's hit-and-miss. Is there an add-on PHP language file for UltraEdit?
You don't have PHP in the Syntax Highlighting - Color Selection - Language dropdown?

Which version you use? Perhaps you just need to upgrade..I'm using the latest and it's there.

<3 UltraEdit :)

Thomas Heretic 07-02-2004 12:04 PM

When it comes to editing php I like Php Edit

It is free and works fairly well.
Well flock now that is an actual release they charge for it. Bastages!

SinisterMotives 07-02-2004 12:53 PM

Quote:

Originally posted by SiN
You don't have PHP in the Syntax Highlighting - Color Selection - Language dropdown?

Which version you use? Perhaps you just need to upgrade..I'm using the latest and it's there.

<3 UltraEdit :)

I have a trial version of 10.20a that has the same View >> View As (Highlighting File Type) options as in previous versions. What version are you using?

SiN 07-02-2004 02:56 PM

Quote:

Originally posted by SinisterMotives
I have a trial version of 10.20a that has the same View >> View As (Highlighting File Type) options as in previous versions. What version are you using?
Heh...I was using 10.10c, just upgrading now.

Odd, when I look in the view menu I also have PHP option...and iirc it's been there through a few versions.

It shouldn't be related to the software being registered, but I don't know for sure, I've never used the trial.

Look here:
http://img56.photobucket.com/albums/...inistar/ue.jpg

and if need be, go here:
http://ultraedit.com/downloads/additional.html

SinisterMotives 07-02-2004 03:01 PM

Thanks, SiN! It's still not there, but at least now I know how to install the wordfile from Sourceforge that Sailor pointed me to. :)


All times are GMT -8. The time now is 03:04 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47