Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Transfering values from an embedded php to html
Old 06-03-2006, 09:22 PM Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
HTML Code:
<object name="combo" height="35">
<embed src="[php url]"></embed>
</object>
The php runs just fine. I put code into the php that echos a combo box. So, now there is a combo box with the values that I want. However, I don't know how to transfer the values from that to html. Does anybody know haw to do that?

PS: I don't know if this thread should be on php, html or javascript, so I chose html.
shane.carr is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-03-2006, 09:36 PM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Is the php url comming from another source other than your own website? If so, php only gives parsed output (html, binary) so there is no values from it.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-03-2006, 09:57 PM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
I have pages on two servers. Why? My main server doesn't support php. So, when I started coding php (about two weeks ago) I had to put my php files on the other server. So, yes, the php is on a different server.

Are you saying that it's not possible to extract variables from a php on a different server?

And, assuming that I put them on the same server, how would I access the variables then?
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-03-2006, 10:36 PM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Within the script itself, you can use file functions (depending on the php version) to open and read file contents from another server. Once php outputs html to the user, it can not pass varibles back except through the proper request procedures ($_GET, $_POST, $_COOKIES)
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-03-2006, 10:48 PM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
I don't really understand what you're saying. I have an html where users go. I load a php into that html using <object><embed>. The php contains an echoed combo box. The php dynamically makes that combo box. If it was static, I would make the combo box in the html. And, the php isn't writing anything to the html. It might be writing a combo box, but not to the html. It's making it within itself. The html loads that php and it then echos the combo box to the object in which it's contained (I think).

And, how would I transfer information through the $_GET and $_POST methods?

PS: I like your quote.

Last edited by shane.carr; 06-03-2006 at 10:54 PM..
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-03-2006, 10:58 PM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
hmmm... This is a really strange senario for me!

The only thing I can think of is possibly using javascript output (from the php page) giving a var value to the parent document (the html page).

I think having your site hosted on the same server would be much less headache tho!
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-03-2006, 11:11 PM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
Brilliant! But, how do I do the javascript output?
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-03-2006, 11:27 PM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
I tried to test, but I can't get the php script to display using the object > embed method
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 12:03 AM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
HTML Code:
<html>
<head>
<title>Combo Box</title>
</head>
<body>
<object>
<embed src="[url of the php]"></embed>
</object>
</body>
</html>
PHP Code:
<?

echo "
<select>
<option value='number1'>Value 1</option>
<option value='number2'>Value 2</option>
<option value='number3'>Value 3</option>
</select>
"

?>
And, the combo box shows up when you load the html. It works on my computer.

Also, this would be a good restarting point for the conversation. Let's just get the selected value to pass between these two simple codes. Sound like a good idea?
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 12:33 AM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Nope - not working on my localhost setup, sorry
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 12:39 AM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
Well, trying to just figure out the proper code without being able to try it is a possibility.

Last edited by shane.carr; 06-04-2006 at 12:50 AM..
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 12:46 AM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Same result I'm getting locally. I now think its IE that is blocking the object embed, are you using FF?
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 12:48 AM Re: Transfering values from an embedded php to html
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
I tried in FF, and it wants to install an unknown plugin
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 12:50 AM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
I'm using apple's Safari. And, trying to just figure out the proper code without being able to try it is a possibility. That might be hard.

Last edited by shane.carr; 06-04-2006 at 12:51 AM..
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 01:20 AM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
I checked it in FireFox, and you're right, it doesn't work. Doesn't work in Opera either. I don't have IE. However, if you have the newest version of RealPlayer (Yes, RealPlayer) you can load the page.




Note: There are more messages on the next page.


_

Last edited by shane.carr; 06-04-2006 at 01:51 AM..
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-04-2006, 01:46 AM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
I checked the other pages on my website where I embed an html in FireFox. It didn't work! Thank you for notifying me. So, is there another way to embed the php in the html, maybe an easier and more efficient way with the ability to pass variables?
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-13-2006, 09:23 PM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
<iframe>. It's brilliant! So, now the combo box is there again, but how do I pass the variables?
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-14-2006, 12:55 AM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
Is it even possible?
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-14-2006, 02:52 PM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
Please Help!
shane.carr is offline
Reply With Quote
View Public Profile
 
Old 06-14-2006, 06:08 PM Re: Transfering values from an embedded php to html
shane.carr's Avatar
Experienced Talker

Posts: 30
Trades: 0
I've been working on this for the past two weeks now; It's starting to seem like it's simply impossible!
shane.carr is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Transfering values from an embedded php to html

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53178 seconds with 12 queries