Jump to content

Php in html help!!!

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
TheCEOandPresident

TheCEOandPresident

    Learning Programmer

  • Members
  • PipPipPip
  • 96 posts
Basically I have two pages one is in php and one is in html. I like certain bits from each of them and I'm trying to take the best bit of the php and put it into the html but it's not really working the way I want. Can someone please help me? I'd really appreciate it.

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
You need to do it the other way around if the php page is dynamically created. i.e. include the html page into the php one
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#3
TheCEOandPresident

TheCEOandPresident

    Learning Programmer

  • Members
  • PipPipPip
  • 96 posts
AWESOME the more difficult way -__- The other page has jQuery on it so that's why it's so friggin difficult

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You're thinking about it backwards:
The PHP generates the HTML with the JavaScript calls to jQuery, which generates more of the page. It can get tricky, but the PHP to generate the HTML and JavaScript shouldn't be all that bad.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
TheCEOandPresident

TheCEOandPresident

    Learning Programmer

  • Members
  • PipPipPip
  • 96 posts
So I have to find a script to put into the php that will THEN call html?

Because right now I'm just copying code from the html and pasting it into the php. As you may have guessed NO BUENO -__- Anyone want to volunteer and give me a hand here?

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
Can you post an example of what you are trying to do? PHP is used to generate the resulting text sent to the browser, you don't have to use all PHP. If your certain PHP codes do something, they can co-exist with HTML/Jquery that is not within PHP tags. You only need to convert JQuery stuff to PHP if you want JQuery to have something generated out of it (dynamic)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
TheCEOandPresident

TheCEOandPresident

    Learning Programmer

  • Members
  • PipPipPip
  • 96 posts
I have attached both of the files that I am trying to "fuse" pretty much I want the radio buttons and that whole text area from the php file and replace the text on the html file with it.