473,378 Members | 1,280 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Dynamic source with PHP variable, is it possible?

Haitashi
Expand|Select|Wrap|Line Numbers
  1. <PARAM NAME=movie VALUE="headerMovie.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="<?php $HEADER_FLASH?>" quality=high bgcolor=#FFFFFF WIDTH="1000" HEIGHT="173"
  2. NAME="headerMovie" ALIGN="" TYPE="application/x-shockwave-flash"
  3. PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
What I'm trying to do is set the "src" parameter dynamically. However, I don't know if that's possible. Can I use a PHP variable as a source? O.o

THANKS!
Nov 17 '08 #1
3 1084
Markus
6,050 Expert 4TB
Ofcourse you can, but you have to echo the contents of the variable into the source attribute.

Expand|Select|Wrap|Line Numbers
  1. <PARAM NAME=movie VALUE="headerMovie.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="<?php echo $HEADER_FLASH?>" quality=high bgcolor=#FFFFFF WIDTH="1000" HEIGHT="173"
  2. NAME="headerMovie" ALIGN="" TYPE="application/x-shockwave-flash"
  3. PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
I should also add, for the standards lover in me, that elements and attributes should all be lowercase. So <PARAM NAME becomes <param name. It's not necessary, but your page won't validate otherwise.

Good day.
Nov 17 '08 #2
Great! I've been trying to use this on OSCommerce and I had to output the variable without the $ sign. I also removed the caps on the attributes. =)

Thanks for the reply!
Nov 17 '08 #3
Markus
6,050 Expert 4TB
Great! I've been trying to use this on OSCommerce and I had to output the variable without the $ sign. I also removed the caps on the attributes. =)

Thanks for the reply!
Very welcome.

Take care.
Nov 17 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andrew.Morgan | last post by:
Hi I have three classes TDigest, THash and TSHA1. //--------------------------------------------------------------------------- class TDigest { public: // Constructors. TDigest(int Count);
2
by: znelson | last post by:
I'm looking for a way to transform the contents of n source tables into a single destination table. This by itself is no problem. However, the name of the source tables change, so I'll need to...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
8
by: Hardrock | last post by:
I encountered some difficulty in implementing dynamic loop nesting. I.e. the number of nesting in a for(...) loop is determined at run time. For example void f(int n) { For(i=0; i<=K; i++)...
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
8
by: akolsen | last post by:
Hello there. This should be simple, but im having trouble anyway of getting it to work. I have a boxed object that i want to cast to its native type, but I would like to use reflection to do...
3
by: Mark S. | last post by:
As I understand it, C# doesn't offer dynamic variable names. Below is my attempted workaround. Is what I'm doing possible? FYI, I already read all the "why in the world do you need dynamic...
11
by: Roderick.Buhagiar | last post by:
Is it possible to create dynamic code which is not part of a class ?
1
by: Gurur | last post by:
Hi all, I have a doubt. If I have 2 structures and one is parent of other , ie the child structure is present in the parent one . And if the child structure is declared as dynamic array in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.