Add A PHP Element To An HTML Page?
I have a .htm page on which I want to add a PHP script that will display links depending on if the user is in session or not. I'm not sure if this can be done on a strictly .htm page, but hey you only live once right? Here's the script I'm attempting to execute:
<? if ($_SESSION['auth'] == "yes"){ ?>
<a href="/index.php?page=sign_in">Sign In[/url]
<? }else{ ?>
<a href="index.php?page=logout">Logout[/url]
<? } ?>
The problem is that I don't know all the back-end php coding for the 3rd party s/w I'm using, but since the design calls for a "main .htm page" that displays all the "include" pages, having 2 links displaying on the same page seems silly (1 link for login and anohter for logout).
View Complete Forum Thread with Replies
Related Forum Messages:
Retrieve The Copy Within An Html Element
I would like to know if it's possible to retrieve the copy within an html element using php. Specifically i'd like to have a script that read the contents of a <p></p> tag with the id 'title' and saved it as a variable. there can be no .php within the html itself. Is this possible or is there a better way of going about it?
View Replies !
Converting The Posted String To The Value Of Html Element
I've been very confused in dealing with posted strings. For example, if I fill in a text element with "(double quote), submit it and display it in a text and a textarea, I get "(backslash followed by double quote) in the textarea element but (backslash only) in the text element. Code: <input name="somename" value="<?php if(isset($HTTP_POST_VARS['submitName'])) echo $HTTP_POST_VARS['somename']; ?>" /> I made a function which correct the misbehavings:
View Replies !
Add Element On The Page
I'm creating a web page to allow the user to change their web page by filling the form. In my form, I use JavaScript to change the properties on their page at the iframe in the same page on my form page. I know Javascript is the client programming, that can change the content of the file in server. I also use PHP to handle to change the content of file (web page) in server. It is not difficult to change the properties on the page at the iframe, however, if i want to allow the user to add element, let says adding a paragraph below the paragraph is existed on the page. How can I add more elements(image, link, heading...etc.) on the page or any function can do so?? How can do it in screen (change the visual page) maybe by JavaScript and how can change the content by using PHP?
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 !
Passing A Parameter From An HTML Page To A PHP Page
I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php???>Pricelist[/url]</li>
View Replies !
Using PHP To Load Another Page Or Html Page
Ive got a PHP script, which if it ends correctly, i want load another PHP file or an HTML page automatically, ie without user intervention. The new page shoud replace the current page on the browser. Is there a PHP command or function which does this?
View Replies !
HTML Web Page Hyperlink To Php Web Page
I am still having a problem parsing a html page with php. Code in my HTML is <? php echo '<a href="index.php">Home</a><br /> <a href="login.php">Login</a><br /> ' ?> However the link is to the Login page is: file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/TeeJayUu/login.php I am using PHP 5.0.2, Apache 2.0.52, MySQL 4.0.21, and Windows XP SP2. All pages are in the htdocs folder and the following instructions have been followed: - Copy php5apache2.dll to Apache's module dir and rename it to mod_php5.so; - Copy php5ts.dll to Apache's bin dir. Finally, add the following line to your httpd.conf file: LoadModule php5_module modules/mod_php5.so Apache has been stopped and restarted. Help - I am lost for what else to do. I want to keep this local until I have got it working.
View Replies !
If Page = 'about' Show The About.html Page?
I wanted to do some kind of PHP script so that if the current page the viewer is trying to view is called index.php?page=about then it will use the php script to embed with an i-frame the about.html file into a cell in my web page's table. Basically, so that the whole page stays the same other than one cell of the table which is dynamic depending on the status of the index.php?page=whatever. Code:
View Replies !
Send Value From CSS Html Page To PHP Page
help me to find a way or script to pass value "digit" from CSS html page to php page which has funtion to accept value and search in database. for example, in CSS rollover image map. if a user select on particular place, that should call PHP page as well as send value to php page.
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 !
How Do I Add A <? To Page? HTML - <?xml
I am trying to change my site from asp to php. but have encountered a problem The start of my pages have always been: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> My problem is when I add <?xml ... the php parser kicks in and starts complaining. If I leave the <?xml version="1.0" encoding="iso-8859-1"?> Off the page is displayed but not correctly in IE! Questions: 1) How can I make php let me add the: <?xml version="1.0" encoding="iso-8859-1"?> 2) Thinking about is I'm not 100% sure why I originally added the <?xml version="1.0" encoding="iso-8859-1"?> (I made the site over a year ago) - does anyone know why it is needed for the page to display correctly in IE?
View Replies !
PHP/html Page
I am building a PHP/html page. when opened it pulls data from an external db and stores it locally as an xml file. The webpage pulls data from the locally stored xml. I need a line that selects the highest # out of these 3 lines on the xml and assigns it a name. On the xml they look like this: <atm-0>82190</atm-0> <atm-1>109190</atm-1> <atm-2>91895</atm-2>
View Replies !
Html Page
I have a page, which I have centered by using: <center> <div> other html <iframe> </iframe> </div> </center> This is so that the page appears in the centre of every browser resolution, whether 800x 600, 1200 x 768, etc. However, I am using server side scripting to include certain elements on the page. For example, there'a a home page, a contact page, etc. Everything is the same in the page except for the comments in the middle. I've put this in an iframe because absolute positioning won't work very well, i.e. the position is different in every browser depending on resolution.
View Replies !
Getting Part Of Another HTML Page
I'd like some help with writing a script that grabs part of another HTML page. For example : I want to grab the content of a HTML page that contains the following strings : <!-- begin --> and <!-- end --> Then I want to get all the content (including these two tags) that is in between the two tags.
View Replies !
How To Ouput A Html Page To PDF ?
I been able to output data from MySQL page and put in into a generated HTML page using <TABLE>. Is there any fastest way to convert the HTML page directly into a PDF document for the user to download when the user click on a link, juts like the one (PDF Version / Printable Version) of Devshed.com?
View Replies !
HTML, PHP, Front Page
I use Front Page 2000 to devolp my web content (don't hate me I just happen to like WYSIWYG better than physically writing out the code for HTML (a pain in the butt language :-) ) Anyways does anyone know if I can have it save files as .php instead of .html and use them in the web setup. Also another question how do I get a server to load index.php instead of index.htm?
View Replies !
Redirect To The HTML Page
I have a page which is all PHP processing. It outputs errors via echo. Since I am using echos for errors, I can not use header("location:http://wwhatever.com") after the code to redirect to the HTML page depending on the success of my operation. The user arrives at this page after clicking a submit button. Form action gets me to the page. The page is all PHP right now. What is a good way to get around this? I do need the echos in case there are errors - also to keep the user apprised of what is happening in the processing.
View Replies !
Html Page - <style ... > Tag
If i have an html page and i am looking for the <style ... > tag. What would be the best way to look for it? I need to look for a special type, something like <script language="Javascript" type="text/javascript" >....<script> .
View Replies !
Parse Html Page
How can I import a html page with my php script? I have a simple html page that actually just generates a simple table of values. I just want to strip the values to insert in to a database. How do I import the html page to my php script to parse it?
View Replies !
Create HTML Page
I would like to make a form that once you insert data into the form,it ll automatically create a html format of the data you entered in a html and save it in a folder! How do i go by doing this?
View Replies !
Jump To Html Page
I am a php newbe and I am trying to figure out how to simply display an existing html page from my php script. Here is the code I use but I get the normal "output started" errors. $sql = "INSERT INTO author SET firstname='$name1', lastname='$name2', workphone='$workphone', email='$email', loginid='$loginid', password='$password'"; if (@mysql_query($sql)) { header("Location: formSubmit.htm"); <--------HERE
View Replies !
Convert A Html Page To PDF
I need a script that will convert a html page to PDF. The html page is an Invoice which contains tables and images, which i would need tobe converted to the PDF document. All the scripts I've found, all require specific modules tobe installed on the server like html2ps, Curl, pdflib etc. I havent yet found a script thats independent from having non-standard type modules installed. Maybe this is because of the resources to code such an application OR the amount of server resources it would take for php todo everything for the converting?
View Replies !
How To Insert Tab In An Html Page???
i am making one appllication inwhich the user enters text in textarea field. i am saving this value in database and when user accesses value from database, i want to display text in a format entered by user. i.e. if the user has entered some text in 2nd line then it should be displayed on second line and not after the end of first line in continuation. if user has entered tab in some location, the tab will be displayed while viewing data from database.
View Replies !
Read An HTML Page
It may sound kind of crazy, but I'm trying to see if there's a way php code can 'read' contents of a static HTML page and store the contents into a variable. Is it possible? If so, how?
View Replies !
Database As Html Page
At both these sites. is there a way to make an .html page for each row of a database,and then to have a directory created automaticall for the date it's in. i thought i saw this done converting to html pages in a forum once. is this clear?
View Replies !
Sending HTML Page
I have a website where people can "join the mailing list" by entering their email address from the home page. THe email address goes into a simple, 1-field db. The field is called "email" and I'd like to write a PHP script to call the entire group of emails, and allow my client to send out a mass email to her list. In other words, maybe she edits the text on her HTML page with the latest "deals" and hits "send" and the script calls the emails fromn the db and, calls in the HTML page and out it goes. I'd like to automate this as much as possible for this client so the PHP works in the background and she is able to keep things very simple on her part. If there is a thread that addresses this task, I'd be interested in seeing it. INitial searches didn't really turn up much.
View Replies !
Html Page - <snip>
im trying to make this option: <snip> a little more easy by instead of having the user click on a number which takes them to an anchor on an html page- having them rather enter in the number of their bday in a field and when they hit enter have the prediction displayed on the page. however i have no clue about php. i do not even really know what question to ask to search for a tutorial about this. really i just want to be able to have a user enter in a number in a field and upon hitting enter have that number pull up and display data from a text file.
View Replies !
Includes Html Page
I need to make a script in PHP in a html page, with the html page included and being called up with the use of include in a PHP page. Being a huge noob with PHP, i logically came to the conclusion anything with the extension .php will recognise everything that is PHP in the pages being called up within, but as this script will take a couple of hours to all up research, make and debug, i'm looking to get clarification.
View Replies !
Expire HTML Page
I define a specific time or date in the HTML page & after that time or Date the page should b expired, in other words, the user should not access that page after the defined date n time. I've this code.Can someone modify it as its not working properly :( <?php $today = mktime(); $expires = mktime( 0, 0, 0, 09, 30, 2006); if ($today < $expires) { header("mypage.html"); } else { echo "Preview has expired."; } ?>
View Replies !
Html Frame And Page
I would like to have a constant logo and list of links at the top of the page, is there a way to do this so I don't have to copy and paste this information into every page?
View Replies !
Export Page In Html
I want realize a php page with a botton that allow to export the same page in html format. Like the action of the browser menu file-->save page.
View Replies !
Invoking An Html Page
I'm maintaining this php application we bought and I need to add a script that invokes an html page located in another server. This html page uses some java code to store the variables being passed on through the url. I've tried the following functions: header("Location: ".$app_reg_url); echo("<meta http-equiv = refresh content=15;url=".$app_reg_url.">"); I've been told to try get_url from the curl library but I can't find any reference on this function. Is there such function? Also, is there other functions that will let me launch another script in another server and work in the background.
View Replies !
Pulling Html Page
It has been suggested by the javascript forum that I would be better served by a PHP script to daily pull a html page and display as the frontpage of my website. Is this complicated to perform in PHP? Bernard Marx, in the Javascript forum said I might need advice on headers,and that I should look at "the issue of caching downstream from your server."
View Replies !
Fetch Cgi Html Page
$site="http://www.miniforum.org/showtopic.fcgi?FID=9"; $open = fopen($site, "r"); $read = fread($open, 15000); fclose($open); i try to fetch content from showtopic.fcgi?FID=9 but there's nothing on it but if you go to the actual web site there're contents is it something related to HTTP header.
View Replies !
|