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.





Two PHP Scripts On One Page Not Working?


I have two small PHP scripts running on a test page

Both scripts work perfectly when there is one script on a page. However, if I place two on the page (one above the other), the second script will not render. I get no PHP error messages - the script will just not render.

I think the PHP Scripts are OK as they were automatically generated by RSS Feed Burner and both do run separately.

There may be an issue with having separate calls of some kind on the page or my server might not be set right. I did a server test that I think shows that it is OK but I am not sure. The only think I have in my htaccess file for PHP is: "AddType application/x-httpd-php .htm .html" .

I am new to PHP and was wondering if anyone can see why both scripts will not run together?




View Complete Forum Thread with Replies

Related Forum Messages:
Calendar Page Not Working (in IE)
I have been hard at work on this one and my computer broke so I haven't been able to resolve this problem for a bit, I open the webpage in IE and it doesn't show up but in FF it shows up just fine, anyone able to give me a hand on this one, it was working fine awhile back but now for some reason it seems to have broken. Code:

View Replies !
Flash Not Working On Page
I have inserted Flash animation on my page as normal (using Dreamweaver)- only it won't display in the browser for this site - which has various php/mysql pages on it - but this one is a simple html page - which displays the html - but not the Flash ?

The flash displays in the browser if I insert it into a page on another site - which does not use php/mysql.

Is it to do with the set up of the site which uses php/mysql ? - e.g. the fact there's testing server settings. My sites/servers are hosted remotely - and not on my own machines.

View Replies !
Session Not Working On Page 3
session ..cant get it to work on page 3 it will not display anyhting on page 3
whhat i do wrong Code:

View Replies !
Login Page Not Working
I have a database installed that can accept a csv file.
when I installed onto a new server, it wont upload.  is there anything obvious in the phpinfo that could be causing this? also, the login page wont work on this server.
just reloads the page again when submitting the user and pass Code:

View Replies !
Get Two Dropdown Lists Working On A Page
i am trying to get two dropdown lists working on a page. How do i go about this. For example, I have 1 table which holds countries and cities. When a user selects a country in the first dropdown list, i'd like the second dropdownlist populate with a list of cities etc. from my database.

View Replies !
Working With Dates On The Modify Page
I have a column in a table called testimonialDate. It is of type 'date'. When trying to modify a record, I can get it to display nicely on the modify page using:

$testDate = $testrow['testimonialDate'];
$testDate2 = strtotime($testDate);
$newdate=date("m-d-Y", $testDate2);

then <?=$newdate?>

However, when I change the displayed date and hit the modify button, it blanks out the testimonialDate column in the record selected.

I've found a lot of hints on the internet for displaying, but how do I send the info back up?
I'm also having issues trying to add a record. Typing in 3-3-2003 in text field results in 2003-3-20 in database.

Can I get some hints or a link to a good tutorial?

View Replies !
$HTTP_REFERER Not Working On Index Page
I'm using $HTTP_REFERER in various parts of my site and it works well. When I use $HTTP_REFERER on my index page to see where members are coming from before they log into my site it won't work. Perhaps this has something to do with the previous page being from an outside site?

View Replies !
I Can't Get Info.php Working On PWS Win98 The Page Cannot Be Displayed
Can someone help me?
I have tried php-4.3.4-installer
I have tried php-4.3.4-Win32
If someone has PWS running PHP4 on windows 98
I would appreciate any help. thank-you

View Replies !
Drop Down Based On First, Working, But How Do I Keep The Value If Page Reloaded?
I have a drop down list that is populated via MySQL. Once an item is selected a second drop down appears, again populated by MySQL. I know how to keep the value for the first drop down, if the page is reloaded.... but the second one is where I am having the issue.

Is it possible to have a page reload and echo not only the first dropdown value, but also the second within the <select> tags?

View Replies !
Submit Page A D Working With $_post Data
I am working with data that I pull from one of tables in my data base and format it into tables for ever entry on my webpage. In each table I place a check box called review (see code below): Code:

View Replies !
Php Code Embedded Inside Html Page Not Working.
How do I make or workaround in my Apache server to parse *.html files
for
<?php ?> code embedded in it?

Currently php recognises <?php ?> tag only if the file has a *.php
extension. Any php code inside *.html or *.htm is ignored.

Since I dont have admin access to the server or admin person, changing
the php configuration is out of choice. Now I have to go thru echo
and print statemnets to get it work. But it looks very cumbersome and
prone to errors.

View Replies !
Changed Page From .htm To And My Drop Down Menu Stoped Working
I have been building a rottweiler site for a friend. I just installed "The Search Engine Project" so I need to change one of my pages from .htm to .php so I can integrate the search results window into my layout.

But, whenever I change the page from .htm to .php my menu, a project 7 css drop down menu, stoppes working. Why is this? Code:

View Replies !
Links Stopped Working - Use PATH/index.php?p=PAGE In My URL
i have just moved my website from one server to another, on the first my pages worked perfect (not considering markup) but now my links just won't work anymore...

i use PATH/index.php?p=PAGE in my URL, it worked well on the other server, but after i switched it just stopped working...

and i have no clue where to find the error... it just keeps showing the first page...

View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this:

<?php
session_start();
session_unregister($SESSION);
session_destroy();
unset($SESSION);?>

In each page I have this other script
#accesscontrol.php
<?
session_start();
if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo
{ #Maybe I use after. } else
{echo "<h1>Sorry...</h1>";
echo "<A href = "index.php"><H4> Login Univernet</H4> </A>";
session_destroy();
exit;}?>

The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.

View Replies !
Working Connection... Not Working? (Advanced)
It has tons of modules, and obviously a config file which opens the db connection. But there is one, and only one, module having strange troubles.

$query is just a simple INSERT INTO command. But it does not inserts anything. I only obtain... nothing. Neither an error from the server! Code:

View Replies !
Sessions Working, Then Not Working?
I wrote a login script (one that I have used on quite a few sites previously) and have found that it was working, then not working, then working again now not working - all without me changing any code. Here is the process:

1) l/p gets sent to login.php to query the db

2) if login successful, set $sid = session_id, and other session variables, register them in the session, and redirect to main.php

3) first thing on main.php is check_login function, all this does is see if $sid is set and equal to the current session_id(). If succeed continue to display data on main.php based on registered user data. If fail, redirect to error.php with the appropriate error code. this all takes place on a shared ssl server if that matters.

The trouble I'm having is the check_login function is failing because no session variables are present, including $sid. I'm 99.9 percent certain it's not a code issue because 1) I have done this same script many times before with no trouble, and 2) this particular one was working before So I am really looking for php configuration issues to check on, or things like that.

View Replies !
$PHP_SELF - Create A Link Which Refreshes The Current Page, And Based On Certain Items On The Page
On a page, I want to create a link which refreshes the current page, and based on certain items on the page (simple form objects like radio buttons)the page will load differently. My link looks like this: PHP Code:

View Replies !
Warning: Cannot Modify Header Information - Redirect From Login Page To Logged In Page
I am trying to redirect from login page to logged in page, but using the {header( 'Location: C:wampwww' ) ;} is giving me this error {
Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwpassword.php:14) in C:wampwwwpassword.php on line 35}, find below my code:

View Replies !
Refresh Problem - Warning: Page Has Expired The Page You Requested Was Created Using Information
i got two php page at the movement, which they called edit2.php and edit3.php. when i submit a form from edit2.php to edit3.php, then i could not come back from edit3.php to edit2.php.

Warning: Page has Expired The page you requested was created using information
you submitted in a form. This page is no longer available. As a security precaution,
Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button. Code:

View Replies !
Page Expired After Going Back From Del. Pageto Form Page Where Comment Is Submitted..
i've made a submit comment form with php and mysql, the form has an action to itself with a hidden var like this: input type=hidden action=add

When i delete a comment on the page i go to a page called delete.php3 and there is a link with a javaline which goes -1 back in my history..

When ive added a comment, the comments page contains action=add and when i delete a comment, i want to click on the link to go back to the comment page, but then, it doesnt work and it says:

Page has expired.

I wondered how to deal with this kind of problems........

View Replies !
Page Has Expired Message In Between The Php Page When I Click Back In Explorer Menu
I have a php script page, which is basically quiz. Visitors (after login in
with their email address) are supposed to answer each question, and when
they click the button at the bottom, the next page will show which problems
they got right or wrong.

Now my visitors, after seeing some problems they got wrong, click Back
button at the Explorer menu, and if they do, they get the below message:
=========================
Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.
========================
Below are the script that I am using. This scripts are after initial login
page, which asks for visitor's email address. I have authorized visitors
already in my MySQL table, and only the visitors whose email address is in
my MySQL table are allowed to login......

View Replies !
Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2:
<? php session_start();
$s=$_POST['sSelected'];
session_register("s"); ?>

in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>

The form var displays the first time the page loads. The session var
displays only after reloading the page2.

View Replies !
Login In A User, And Then Pass The Username And Session_id From Page To Page
I want to login in a user, and then pass the username and session_id from page to page until the leave the admin area of the site. Here's a simplified function: PHP Code:

View Replies !
Insert A Page Break For Printing Purposes After X Records On Page.
I need to insert a page break for printing purposes after X records on page. I'm querying five diffrent records with 5 different results and displaying them like:

$record1
$record2
$record3 and so on

So I want to get total number of records which is pretty easy I just add all the totals let's call it $subtotal. Then I want a page break after every 20 records of the $subtotal. Is this possible?

View Replies !
Build A Page That Takes Form Data, Processes It In A Second Page
I'm trying to build a page that takes form data, processes it in a second page, then sends the user to a third,depending on data processing.

On the second page, I am trying to get the page to have some sort of "Loading" message while the backend processes the data, but I can't seem to get anything to work. Does anyone know how I can get that Loading message to display?

View Replies !
Script To Open A Small Page When Loading A Large Page?
the idea is a script that loads when a large page is trying to open that need for example 5-6 mins to load and in the mean time to open a very small page that is saying loading the page please wait and when the large page is loaded to go directly to that page. Do u get my idea?

View Replies !
Transfer Session_id() Between A Secure Page To An Unsecure Page - SSL
I am having problems understanding how to transfer session_id() between a
secure page to an unsecure page. When I move from the secure page to the unsecure page the session_id changes.

Here is the script:

Secure page:
<?php
session_name('thename');
session_start();
echo session_id();
..
..

View Replies !
IF Else Statement - Form Being Submitted From Another Page And Being Directed To A Second Page
I have a form being submitted from another page and being directed to a second page. In this form is a checkbox called nonprofit. When checked the value is 1.

On the second page I have the following code:

View Replies !
[refreshing A Php Page Resulting Page Cannot Be Found Error]
i have a php page that will refresh by itself by using a meta tag and meta timer. however, without a clear indication, my page will just go "Page cannot be found". bizzarre but when i press refresh, the page can be found!. i am not sure whether this is an IE problem or issit my script problem. i don't encounter this problem if it's just a plain file.html.

perhaps is my session string? i am passing my session thru the URL and i constantly refreshing it. is that the problem? my url looks like this: domain.com/myfile.php?authorize=mike&token=f5c0f7edd785a6a9448c50249bad18ed

View Replies !
Page Control - Next/previous Or Select Page Number
I'm looking for php script examples that will help me control page layout. Using a table with 12,000 records, would like to be able to display only 5 records per page with page controls at the bottom of the page. The bottom edge would have next/previous or an optional insert desired page number.

View Replies !
Create A Page That Will Eliminate Everything Between The < Script > Tags On A Page
I have been trying to create a page that will eliminate everything between the < script > tags on a page and then render all the HTML that is leftover. For some reason, the page won't load for me, but when I copy the source, paste it in a text editor, manually delete all the JavaScript, and then just render what is left over, it works fine.

I have an error and I don't know why I'm getting this error. I don't know what is incorrect about the code.

QuoteParse error: parse error, unexpected ':', expecting ']' in /fantasypoints.php on line 25 Code:

View Replies !
User Login Page - Password Requiring Page
i just created a user login page which works. However, I don't know how to get them to a new password requiring page after they press the submit button. How do I go about getting them there?

View Replies !
Sessions And Redirects - Send Info From Page One To Page Two.
I have a two part form, each part on a seperate page. I want to send info from page one to page two. Thought ok, I use session variables. The problem is that they don't get sent to the second page. All works fine on my local testing server, but when I go live session varables don't show. Has this something to do with header? Is there another way to get to the second page? Code:

View Replies !
Pagination :: 5 Page Numbers On Both Sides Of The Current Page
I want to put a pagination on bottom of the page and I have like 100 page numbers or more, so I want to show only 5 page numbers on both sides of the current page, if u know what i mean like:

Prev .. 8 9 10 11 12 13 14 15 16 17 .. Next

when i move to the right or left then i add or subtract one. Here 's what i have so far:

for ($i = 1; $i <= $numPages; $i++) {
        echo " ";
        if ($i == $pageNum)
            echo "$i";
        else
            echo "<a href="?page=$i">$i</a>";
 }

View Replies !
Make A SESSIONS To Be Carried From Page To Page Throughout The Site.
I am working on a site and I need to make a SESSIONS to be carried from page to page throughout the site. My question is the site i am working on doesn't require login or anything so how I can register the SESSIONS as?

View Replies !
Page Redirection - Link Index.html Page To A .php Pag
I have an index.html page with a link to a .php page This is the complete code of the .php page Code:

View Replies !
Transfer Certain Portions Of Text From The Right Page To The Left Page.
I have a page split in two and I want to be able to transfer certain portions of text from the right page to the left page.

View Replies !
Page Redirection - Allow The User To Click A Button That Sent Them To A New Page
I am writing a little section of a home made shopping basket. I collect information and put it in the basket / db. However, I want to update into a new database the final order as and when I click a button that directs the usuer to Pay Pal. My thought was to allow the user to click a button that sent them to a new page that updates the final order database and then redirects to PayPal the information required for billing without the user having to press another button. Would this be a sensible wat to go about it.

View Replies !
Email Me This Info Page From A Order Confirmation Page?
How do i make a "email me this info" page from a order confirmation page? Basically someone enters some info in a form, then on submission is comes to my email. After submission, i want to have a text area where they can enter an email address to have the info emailed to them if they wish. You can see the page here, you have to enter info first, the email nbox on the second page (process.php) is non fuctional.

View Replies !
Pass The Variable From 1st Page And Read It With Other Name On 2nd Page
I am new to this and learning slowly, but I was hoping someone could give me some quick advice on how to create a variable on one page and have it passed to another to be read as an ID for a mySQL database.

I want to pass the variable "varRevID" from one page and have it read as "reviews_id" on the other.

My database is pulling from just the first record and I would liek to designate from the pointing page which record to pull from.

View Replies !
Launch New Page And Refresh Exisiting Page
I know about not being able to change header info after output to the browser but what are the workarounds if any?

I have a basic form where a user logs in - the details they submit are verified in supportlogin.php and then if successful I launch another browser window with Javascript but the window in that they logged in at remains on supportlogin.php and is blank... How can I launch the new window and send the first window back to the login page? PHP Code:

View Replies !
If Value =1 Direct To Page Otherwise Show Data On Page
In the member account area there is a button saying (list) when the member clicks this they are redirected to add.php here i am wanting to check if a members account is limited, if it is direct them to a page saying you must pay your bill. if its not display the info on the page.

in the database there is a field called limited which is tiny in if its not limited the value of the field would be 0 if it is limited the value would be 1.

View Replies !
Keeping Lots Of Values From Page To Page
I am doing an online questionnaire which is going to have 5 questions per page and upto 100 questions.

If somebody hasn't completed the entire questionaire I do not want their data stored in the DB. I was wondering if anybody can tell me the best way to either use sessions to store the data and do a final update at the end, or use a temporary db table to hold the data.

View Replies !
Page Rotator Without Leaving The Actual Page...
I'm trying to write a homepage page rotator. The home page is default.php and I want 3 pages to rotate in that file without leaving default.php or directing to the actual pages I'm rotating... Basically, a content rotator but I want the content to be individual pages.

Here is what I have but it seems I have a bug somewhere:

<?
$pages = array(
include(page1.php),
include(page2.php),
include(page3.php)
);

shuffle($pages);
$i=0;
$number=2; while(list(, $page) = each($pages)) {
if ($i>=$number) { break; }
echo "$page";
echo '<br>'
$i++;
}
?>

For some reason the pages aren't coming up right in the default.php page.

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 !
Login Page Produces Blank Page
What I get when I enter username/password and hit submit is a blank page and the URL never changes. In other words, the login page is 'index.php' and when submitted it should redirect to 'admin.php'. Instead the url/address stays at 'index.php' and the page turns completely blank.

In the previous thread, the problem turned out to be some missing indicator to the md5 encrypted password. Well, in this version, that's there! In fact, I used the ending scripts for that project in creating this project. So, why it won't work is a real mystery. Code:

View Replies !
Displaying Parts Of A Page While The Page Is Not Complete Yet
A script I'm writing outputs a HTML table with many rows. Each row is the result of a query which takes about one minute to perform. When I run the script in a browser, the page takes several minutes to load and then displays the entire table. Is it possible (using PHP) to display the table as it gets constructed, one row at a time?

View Replies !
10 Pages Per Page, On Search Results Page.
how to limit the results to 10 pages per page. And for the result of the result to span over other pages numbers 1.2.3. etc. Does anyone have the code for this? Code:

View Replies !
Display A Page Within A Page ($Donation To Forum$)
I know absolutely ZERO about php...This being said, I have some money to make a donation to the forum if this very simple, yet extremely annoying problem that I have is fixed. Let's say I would like to insert a page within a page for example a parking page. Code:

View Replies !
Setting A Variable That Stays From Page To Page
how can I define a variable that can be recalled from different pages without having to be defined again?

View Replies !
How Can I Pass Variables From The 1st Php Page To The 2nd Php Page Without Using Cookies
How can i pass variables from the 1st php page to the 2nd php page without using cookies or passing through the URL from an <a HREF="2ndpage.php"> link? the variable consist of 200 characters. for example some code

//for example i get the variable $variable from the db.

while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
<a href=&#392;ndpage.php'>
}

View Replies !
Setup A Link In My Page That Will Change My Page
I am working on a page with a right column that I want to use for
navigation. In this right column I am using the below code to set a
value for the link. I am using the variable $test right now.

I want to click on the link and when the value is set to a certain
value, say 1, I want the script to run and load a page based on a
switch case. This way I can use different links for navigation that
will load different forms and areas of my application. So here is the
code for the link line. Code:

View Replies !

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