William Piper wrote:
> Hayden's Harness Attachment wrote:
>> Thanks. Your suggestions got me thinking and I seemed to fix the problem. I
>> now get:
>>
>> Parse error: syntax error, unexpected '=' in
>> /usr/home/choroid/public_html/new/crf_header.php on line 37
>>
>> for the code:
>>
>> <?PHP
>> sitestyle = $_get[set] {
>> case 'layout_medium':
>> case 'layout_large':
>> case 'layout_small':
>> echo '<link rel="stylesheet" type="text/css" media="screen"
>> href="http://www.choroideremia.org/new/($sitestyle) '.css'" />';
>> $_session['sitestyle'];
>> switch ($sitestyle) {;
>> break;
>> }
>> ?>
>>
>>
>> Angus MacKinnon
>> Infoforce Services
>> http://www.infoforce-services.com
>
> Your case statement is out of order, do this instead:
>
> <?PHP
> sitestyle = $_get[set] {
> switch ($sitestyle) {
> case 'layout_medium':
> case 'layout_large':
> case 'layout_small':
> echo '<link rel="stylesheet" type="text/css" media="screen"
> href="http://www.choroideremia.org/new/($sitestyle) '.css'" />';
> $_session['sitestyle'];
> break;
> }
> ?>
Actually using the case adds a whole layer of complexity that I don't
believe is needed. I would do this instead:
<?PHP
$sitestyle = $_GET['set'];
echo '<link rel="stylesheet" type="text/css" media="screen"
href="http://www.choroideremia.org/new/'.$sitestyle.'.css" />';
$_SESSION['sitestyle'] = $sitestyle;
?>
------------------------------------
Please remember to write your response BELOW the previous text.
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-listYahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php-list/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/