Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Html Within Works, But Within Html Doesnt


Below are two different ways of writing the same script. The top one works
but the bottom one displays nothing in the list. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Can't Get Apache To Run PHP Inside Html From Localhost - Works Fine From /var/ww/html
I had a look at the stantonfinley fedora core 5 instructions and robooted but to no avail. PHP scripts work fine from var/www/html whether the suffix is .php or .htm but not from localhost. Code:

View Replies !
HTML Works Same
If this question has been asked before I am really sorry. but right now i am really amazed since I see all my html files work as same as php files. I use bunch if include codes on my pages and therefore i use php to make the server recognize. First I create the file as html file and I convert it to php and thats how the server reads.
If there is only html file uploaded it was not reading the include files and all the include sections used to be blank since it is html.

Couple mins ago i was trying something and i saw that html files read as same php. widget.html is same widget.php and even more interesting if you want to reach the content from widget.html it goes to widget.html?subaction=etc.etc. it used to widget.php?subaction-etc.etc.

Is this normal? was I sleeping when this thing came out ages ago? Last time about coupke months ago there wasn;t such thing and now I am really surprised, I would appreciate if anyone can comment on this.

View Replies !
Using Fopen() To Create New File - Works For A Few Then Just Doesnt
I am currently working on a content management system where a user can
fill in a form (title, keywords, link text etc. - all the initial
attibutes), which when submitted, will go onto create a web page.

The code is as follows:

$html = "<html>
<body>
<p>Hello World</p>
</body>
<html>";
$handle = fopen($_SERVER['DOCUMENT_ROOT']."/path/to/folder/".$filename,
"w");
fwrite($handle, $html);
fclose($handle);

Pretty basic, I think. I works for a few and then it just stops. I get
no error to say that 'could not create file' or 'file not found', it
just submits. Any reason for this? I have tried searching the C: drive
for the file but it cannot be found.

At the moment Im trying to figure out when it actually occurs but for
some annoying reason, it seems to be working now. I would prefer to be
assured that it wont occur again so just thought I would still post
something here just encase this problem is a known one.

Is fopen() the best solution for creating files? I was aware that it
was used to open an existing file but create one (?). Is this what it
was intended to do? Im sure it is, but its new to me.

View Replies !
Inserting Adsense Code - Html Program That Automatically Coverts All My Text Files To Html Webpages?
I've purchased a text to html program that automatically coverts all my text files to html webpages within a template, but the only problem is how do I insert my adsense code into all 250 pages? I've seen articles regarding PHP includes for page templates, but I'm not sure how this would work inserting my code.

View Replies !
PHP HTML Email Doesn't Format The Text Using The Html Tags
I had a PHP script that sent an html email from a Flash form. It was all working on a Windows based server. Then my server was switched to a Linux based one. It now sends the email, but has a lot of random characters and doesn't format the text using the html tags. Code:

View Replies !
HTML Email Using PHP Problem (Receive Html Tags)
When I send the html email, the only thing I receive is the tags (the
html codes basically). I want to be able to see the email like a html
page, what is wrong with my code? Here is a copy paste of it.

$HTML = "</html><body><img src='http://www.somewebsite.com/
someimage.jpg'></body></html>";

$headers = "From: $from
";
$headers .= "MIME-Version: 1.0
";
$boundary = uniqid("HTMLDEMO");
// Now we attach the HTML version

$headers .= "--$boundary
".
"Content-Type: text/html; charset=ISO-8859-1
".
"Content-Transfer-Encoding: base64

";

$headers .= chunk_split(base64_encode($HTML));

mail($to,$subject,"",$headers);

print "mail Sent<br>";

The email I receive has this as text:

</html><body><img src='http://www.somewebsite.com/someimage.jpg'></
body></html>

View Replies !
RemoveHandler .html .htm (parse Php In .html Files)
I want to parse php in .html files.

I put this in .htacces file:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

Its work, but some of my php aplications have urls:

www.mysite.com/this-is-page

without .html in the end

how to parse that? Which code I must use.

View Replies !
Embed Php Generated Html In Another Html Page
I am trying to include some php generated html in a page that is just a standard html file, NOT a php file. I have seen other html pages do this by including an src to the cgi script in script tags, like this:

<script src="http://someurl.com/somescript.cgi"></script>

the html page loads and the script is executed and the returned html is displayed in the calling page. So, I tried this:

<script src="http://someurl.com/somescript.php"></script>

It doesnt work!!

View Replies !
.html' Page Be Replaced By '.html.php'
Can a '.html' page be replaced by '.html.php' page via RewriteRule? To clarify, I'm using a software that formats the look of the site using .html pages. I'd like to add PHP code to that page but of course, it is not of the right page type.

What I was wondering is Could I create a duplicate of that '.html' page, rename it to .g. '.html.php' and make the revisions and then just create a RewriteRule that redirects the '.html' page to the '.html.php' without generating an error?

The alternative and undesired way of doing it would be to rename the original page to '.html.php' and find and revise ALL of the routines that call that page. That would create a revision nightmare especially upon upgrading the software.

View Replies !
Require_once(&lt;html Fragment File&gt;) Vs Document.write(&lt;html Fragment&gt;)
To reuse common fragments of html on many pages I have used javascript functions, called from a linked .js file, which are precisely one instruction: document.write(<the html>).
I'm starting to learn PHP now and see that a require_once(<url for file containing the html fragment>); will have the same affect.

My question is, which method is more efficient? i.e. renders faster?

P.S. is there a simple way to set up testing-only server-software on my local machine so i can debug php locally before uploading them to site's server?

View Replies !
DOMDocument Thinks "<html></html>" Has Two ChildNodes?
I'm trying to mess around with PHP5's DOM functions and have run into
something that confuses me:

<?php
$dom = new DOMDocument();
$dom->loadHTML('<html></html>');

echo $dom->childNodes->length;
?>

Why is the output 2? Shouldn't it be 1?

View Replies !
$_POST From HTML --> PHP --> HTML
I've read a bunch of threads but I think I'm missing something.

I am using paypal as a payment method for a client.

But I need to do some variable checking before sending the customer to the paypal page.

I want to pass the variables to paypal as post (so the url doen't get crazy).

Is there a way to pass post variables to a PHP page that doesn't ouput anything (expect header redirect), and include those variables so they appear at the page that is redirected to?

View Replies !
HTML With PHP, How I Can Add PHP-code In HTML...
Could you help me. How i can add my PHP script or PHP- code in HTML-file.

View Replies !
PHP In Html Or Outside Html Page?
what's better, php code in html page or outside the page in seperate php file...the thing is i have my sql data in that code and i don't want people to see it, can people open up the php files?

View Replies !
Html Emails Vs. Non-html
I've sent out html emails and I have had a few people tell me they can't see the html, only the raw code. I imagine it's easy to tell them to activate viewing their emails in html. But, is there a way for the code to distinguish between emails that do not view the html properly? How can I fix this situation?

View Replies !
<link:page.html,xxx> => <a Href="page.html?id=xxx">
I want to transform this code <link:page.html,xxx> to

<a href="page.html?id=xxx"> dynamically.

I tried out alot of preg_replace stuff, but I didn't get to manage it.

View Replies !
Include An Html File In Another Html File?
Can I include an html file in another html file usign PHP? Something like the way you would inlclude a text file, only have the html elements show up?

View Replies !
Class Works In Local, Not Works On Server
I have created a simple shopping cart class, it works fin in local (php 5) but not works at all in server (php4), although I tried to make it compatible with php 4 too.

I got this error ->
Fatal error: Call to a member function on a non-object in /home/**/domains/**.com/public_html/shop/cart.php on line 34 Code:

View Replies !
.doc To .txt/.html?
Hi everyone,

I'm making a site where people can upload articles, that are then stored in a mySQL db. The problem will come, of course, when people want to upload Word documents. Which they will.

Is there any way in PHP of turning the .doc file into a .txt? Or even better, a html file with any formatting (bold etc) intact?

A problem I have with my current site, on a related note, is that when people cut and paste from a word document into the form field, then submit it to the db, the resulting text is displayed with non-valid ASCII characters, which the w3c validator chokes on. I'm pretty sure there is a function that converts them, but a search of the manual didn't bring it up.

I'd really appreciate any help you can give me...

View Replies !
HTML 2 PHP
I'm trying to convert my site from html to php. Instead off having to write seperate html files I want to insert my files in a kind of template file (index.php).

I know that the include() function can do that so I have links in the form of index.php?file=whatever.php, but i don't want directly link to my files directly but i want to user variables for that. so my url will say index.php?file=variable or something.

Can I set variables in my index.php so he checks for that variable and replaces the $file with that variable? So if my variable is $foo='anypage.php' that my url will say index.php?file=foo instead of the real filename.

View Replies !
Html Into Xml Tag?
do u know how can i put html into and xml tag
Example:

<element><br></element>

i receive error "the page is not well formatted" ...



View Replies !
HTML & PHP
how do i define a php variable using html?
i want to set an shtml page as a page with links to products - when each
button is pressed it it sets the product_category variable and lists all
entries with this variable - how do i set the html link to set the
variable? wat do i need to set the product_category to?

View Replies !
--PHP To HTML
if that's the case, please just tell me where the best place for
a newbie PHP question would be.

I'm just learning PHP, and I need to know how to pass data from an HTML
input form to become the content of a new HTML page, using PHP.

In other words, I have an HTML page that lists parenting program
information, thus:

PROGRAM 1
Start Date: Aug 5
End Date: Dec 5
Time: Every second Thursday, 11:00am to 1:30pm
Location: X Building
Duration: 12 weeks
Capacity: 10 parents

PROGRAM 2
Start Date: Aug 7
End Date: Oct 14
Time: Wednesdays, 6:00pm to 9:00pm
Location: Y Building
Duration: 10 weeks
Capacity: 15 parents, up to 30 children

There are about 15-20 programs being offered at any given time, and they're
constantly being added, deleted, and changed, so it's too hard to update
them manually myself. What I want to do is:

1) Design an HTML input form on an intranet page that will allow users to
add, change, or edit program data based on the fields listed above. I know
enough HTML to do this.

2) Take that data and pass it to a new HTML file that will be available to
the public, called "Our Program Info", which will list all the program info.

I did try to RTFM to figure out step 2; but the manual is so large, and I'm
so bad at programming in general (the only reason I'm doing this is because
my wife runs the charity organization that this is for), that I couldn't
find the right place to look. If someone could (gently) nudge me in the
right direction,

View Replies !
PHP-Yes, HTML-No --- Why?
I have a tiny program:

<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>MyTitle</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
</head>
<body>

<?php
$host = $_SERVER['HTTP_HOST'];
$server = strtolower($host);

echo 'My variables<bg>'

echo("<br>Host: $host");
echo("<br>Server: $server");

?>
</body>
</html>

I upload it to my webserver as test.html and as test.php. Then I test
them in my webbrowser. The test.html does not work, but the test.php
does.

View Replies !
PHP Using Php Var In Html
What is going wrong?

$mystring= "part1 part2 part3" // remark the spaces!
.....
<td >
<input type="text" name="test" size="50" value=<?echo ($mystring);?>>
</td>
.......
the text field will only show "part1" and not the rest of the string!

View Replies !
Php To Html?
I urgently need to develop a site with around 30-40 pages.

The site must be multilingual. Usually I use a top.php which generates a
lot of my structure. Then for every page I do:

include('top.php');
....page stuff...
include('footer.php');

in this case if I want to add a simple thing in my menu I only change it
in top.php. For the language part I inlcude a lang.php which is like this:

$lang["menuHome"]["en"]="Home";
$lang["menuHome"]["gr"]="Αρχική";

and so on. In my pages I only put print $lang["menuHome"][$l] where $l
is "en" or "gr" (http://.../page.php?l=en)

The site I must develop must be in php for the web but the customer
asked to have it on a CD-ROM, which of course should be simple html.

Is there a tool to convert my site in simple html?


View Replies !
Doc -> HTML
Google has a cool way of showing .doc files in html format. can this be done using PHP.

View Replies !
Html To Doc And Pdf ?
After suffering with asp.net, i finally convinced the company to turn the
application we are using to PHP but my concern is, what is the easiest and best way to convert html that is generated from mysql databse to microsoft word and pdf files? The application will run on a linux server...

View Replies !
Php On Html?
Can I add php code directly to an html document or is it possible to
have an include on an html page the read a php document?
If so how would I do it?

View Replies !
Php, Html?
I want to use WYSIWYG instead of writing html myself, but is it not possible to use wysiwyg with php?

View Replies !
PHP To HTML
I have a page, handout.php that prints out value, and I was wondering if there was a way to, on the click of a button, turning that php page into a html page with the date.

For example I click the button and it saves it as page22_07_07.html And then clears everything from database that was in that table.

View Replies !
RGB To HTML
I have this mysql table field with a RGB value like 120-10-200 and I nead this php function to convert this value into html color ...

View Replies !
PHP From HTML?
I've created a dynamic site using PHP and MYSQL which is working great. To save server load, I have an admin feature that dumps all the pages (static) to HTML for browsing. However, on the dynamic site, I have a php include with checks IP Address and records a hit if it is unique. As the HTML dumping simply reads the source of the outputted dynamic page and dumps to HTML, the IP Addresd feature doesn't work.

Is there a way to call a PHP Include from HTML or do I need to dump all the static pages to php instead?

View Replies !
.html To .php ?
ive got this website up and running in basicly only html , images and iframes , but its kinda slow when there are so many things to load , so i was wondering how do i change it to php ? how do i code a finished html website into a php website ?

View Replies !
Html/php
how do i read the data in the variable max in another class? (php)

<form method="POST" href="x.php">
<a href="submit()">Click here!<input name="max" type="hidden" value="yourValueformPHP">
</form>

Is the form right?

View Replies !
.PHP V. .HTML
I have been told that there is a way to tell Apache to treat your .html files like .php files, so that you can use .html extensions when running PHP. Can anyone help me out with how to do it? Is there a better way to accomplish this objective?

View Replies !
RTF To HTML
How do i convert RTF to HTML? Any existing class or script?

View Replies !
Html With Php
i hav the code as
<?
      $msg="welcome!u r here".echo "<a href='a.php'>click me![/url]";
      echo "$msg";
?>

so i want the output as:-

welcome!u r here click me!

where "click me!"  is the link to a.php page

plse can u tell me how it is?

View Replies !
PHP As HTML
is there a way to get a phpnuke block/module and turn it into straight html? For exampe, have a scrolling supporters block as an HTML code.

View Replies !
PHP And HTML
I don't get how PHP makes HTML. Does it generate it automatically or do I hav to tell it what HTML to generate or what?

View Replies !
PDF To HTML
Is there anyway that I can convert a pdf document to HTML file using PHP. Suppose if i am uploading a pdf document and the php script should convert the document to HTML file.

View Replies !
Html (via Php) Or Pdf?
I generate a product catalogue via php/mysql for which I control the page layout very well. The client also wants a full catalogue with all the products in a printable version. My only major problem in html is the control of the page breaks (I just want to a insert page breaks before each product) and in some extend the TOC. Another nice thing would be to have a pdf template with header & footer in which I could insert my html pages.

Is this possible in any way without going the pdf route?

The other option is to create a pdf file. Two possibilities here : either convert the html page to pdf (but then what about the page break) or use a class to create the pdf from scratch (but this is a big job)?

My best guess is to make a php script to
0/ open the default final pdf page that contains the cover...
1/ open the pdf template containing the header/footer for each page
2/ create the html temp file for product 1
3/ convert that html temp file to pdf and insert it on the pdf template in the final pdf page
4/ add a page break to final pdf page
5/ loop for all products
6/ create the TOC
7/ add the TOC at the end of the final pdf page
8/ also add the order/legal info at the end of final pdf page
9/ send the final pdf page to the browser

Is that the best way to do it? Can anyone share some experience on the subject?

View Replies !
Html To Pdf
I am a web designer intrested in learning php. Currently I have an urgent task to perform within 24 hrs. I would be very grateful if someone can help me with it.

here is what i require

I have a page which has a standard layout but elements on the page are generated dynamicaly. i would like to give the user the oportunity to then convert this page into a pdf so they can download, and store. Only difference is that when they download the pdf i would like that pdf to be a pre-set template which has terms and condition pages attached to it. I have PDFlib installed on the server and PHP, although i maybe moving it to a different server so would be better if it could be done without using PDFlib.

View Replies !
Txt To Html
Im at a complete loss, what would the code for a txt to html look like? I cant figure it out?

View Replies !
PHP Into HTML
How can I combine PHP into HTML? I have a whole HTML layout. and I want to put a PHP e-mail form INTO it. The php is just a form mail. I took the old form out of the html, where do I place the current php form?

View Replies !
HTML Php
used to program using HTML. THis is the code I have, which works fine in HTML, yet not in PHP.

<?php
echo"<style>"
."#bg {background-image: url(bg.gif); width: 10px; height: 30px;}"
."</style>"
."<div id="bg">"
."</div>";
?>

View Replies !
FROM Php To Html
I need to save a redesigned index.html page from another web to the new server. In the new server the index page is in .php. [I realize this is probably better, but I haven't gotten into PHP yet.] How do I save it so it's the site's index page?

Do I open the new index.html file and save it as index.php, overwriting the old index.php? I know this must be simple, but I've just gotten through working with a couple of complex PERL forms and after some late nights, headaches, a couple tears of frustration and stress {b/c of the perl} all this code and filenames are starting to run together.

View Replies !
Add Html
I've been working none stop for two days on a proyect and I have ran into a roadblock.

I need to create a simple statement that goes like this:

If the URL contains something like index.php?id=10, then do nothing, else, include some HTML, such as a table. How would I do that? Again, sorry if this overly basic, but my brain is fried.

View Replies !
Html Vs. Php
I have been doing my site exclusivley in html. What is the big differences bewteen php and html? What are the advantages/disadvantages? What, if any would be the penalty from going from an html site to a php site? Would this hurt the PR I have already gotten as well as the search results? Woud it appear to be a whole new site?

View Replies !
Html Vs Php
I'm doing some work on an existing site, with many incoming links to .php files on the site. Some of these pages are not dynamic, and therefor could be .html files. How big a difference does it make in terms of server load if a page is processed by php (with no php tags in the document) versus a page an html page?

Ie, is it worth changing these pages to .html and using 301 redirects to save on processor time? Or is the gain so small that I'm better off leaving them with the php extensions?

View Replies !
Mht From Html
Can you advise me any class for creating an .mht file from a html file and folder with images and styles that uses this file? but there's no instructions on how to use the "mht.lib.php" class. Please explain how to use it, or give a link to any other class you've used.

View Replies !
How Much & How Much HTML?
I code/write HTML in such a way that as little as possible is PHP. for example, assuming I have already got the variable set up, I would write:

<b>Welcome <?php echo $_SESSION['user_name'] ; ?> to the forums </b>

where as it seems by reading most post on here, a lot of people would write:

<?php echo "<b>Welcome " .$_SESSION['user_name'] . " to the forums </b>" ; ?>

When I first started PHP, this is what I used to do, since that was the way it is taught in "WROX - Begining PHP4"

and when I am printing out tables that contain (suprise suprise) tabulated data, only the contents of the cell is done in php, for example: Code:

View Replies !

Copyright 2005-08 www.BigResource.com, All rights reserved