Posting To The Current Page
Is it possible to post a value to the current page and display it when the page reloads?. For example if I am on 'page1.php' and usign a form to post a variable to 'page1.php', would this be possible. Possible code below: Any other suggestions if this wouldn't work? This is code for page1. php
<?php
echo $_POST['selection'];
?>
<form action="page1.php" method="post">
<select size=1 name="selection" onchange="this.form.submit();">
<option value="goalkeeper">Goalkeeper</option>
</select>
</form>
View Complete Forum Thread with Replies
Related Forum Messages:
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 !
IE Trying To Save The Php Page When Posting From Another Page
After installing Apache, and the newest PHP, I find that when i open a php page explorer reads it but if i press a submit button that posts to another page or performs any pho script internet explorer immediately says the file type was unrecognised e.g. stage_2.php was unrecognised would you like to save? I'm unsure why this is happening, perhaps my php.ini file isnt set correctly?
View Replies !
Php Page Without Posting
I have a page (a.php) that accepts input from the user via text boxes. The action of the form is set to the same page (a.php). The When the select button is clicked the following is set <input type=hidden name="updating" value="1">. This is used to update information to a database during the repost of a.php. Is there a way to load a confirmation page after the update and pass data to it on the fly without usine the <form name="arm" method="post" action="a.php">?
View Replies !
Posting To Same Page
I have a script that pulls data from a db. I need a user to be able to update the form info and then have the from refresh or post back to it self with the updated info. I can't seem to get this to work.
View Replies !
Refferring Page And Current Page?
I can't find a var that contains the referring page (I've looked on PHP.net and in several books)...there is one in ASP, so I am assuming there is one in PHP, too. And, I would like to test for the current page so that I can modify my menu and footer depending on the currently loaded page...is there a var that reveals this?
View Replies !
Hyperlink And Posting To New Page!
I have a page where I have done a successful query and get search results displayed. Now I would like a link activated so that they can click on the name and go to new page with further details about that company like address hours etc.
View Replies !
Posting Back To The Same Page
I have a website that uses user authentication. The login does a post back to itself to check set usernames and passwords. <?php echo $_SERVER['PHP_SELF']?> sample url: .../admin/login/index.php This is working on a linux box where the end of the php code sends the page off to a ccc.php page for access checking. So after logging in on the index.php page, you eventually get returned to admin/ccc.php. I reused the same code on a windows box and the .../admin/login/index.php takes me to .../admin/login/index.php/admin/login/index.php does anyone have a clue as to what might cause this?
View Replies !
Posting Many Times To Page
I have a situation where I need to post alot of data to a legacy system we have and it takes a long time for the system to do the inserts. I was wondering if there is a way to post without waiting for the response, so I could do say 15 posts one right after another and it would open 15 connections but not wait for them or put them in the background. Preferably without forking if its possible.
View Replies !
How Can I Get URL Of Current Page
I went through and searched the PHP manual, and didnt find what i was looking for. I am a PHP newby obviously. On to my question, I was just curious, is there a php variable that calls on the URL currently in the address bar? I am writing a php script to redirect a user, depending on what domain the page was accessed from. Any assistence would be GREATLY appreciated!
View Replies !
Getting And Using Current Page URL
could some1 please help me withg etting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as follows: Code:
View Replies !
Current Page
HTML Code: <tr align="left"> <td><a class="mainlevel" href="population_common.php" <?php if($_SERVER['PHP_SELF'] == "/zeus/population_common.php") echo ' id="active_menu"' ?>>Population</a></td> </tr> PHP Code: elseif($_SERVER['PHP_SELF'] == "/zeus/population_elite.php")
View Replies !
Emailing The Current Page
I now have a client who wants the facility for visitors to email a page to friends. He doesn't want the link emailing, he wants the page emailing "because people prefer that" - well, certainly not the people I know, but he is paying... And I don't see the sense in this, because he could end up sending code out that can't be interpreted by the mail client. As I don't use HTML email, can I ask - is there a way to get the page to show automatically via a link, without the client clicking on it?
View Replies !
Page Doesn't Refresh To Current One
I have a comment/feedback section to my website. After a person enters their comment and submits it I was hoping to have it refresh the page with the current page and their comments now displayed, but it is redirecting me to another page that I include. Code:
View Replies !
Current Page Is Secure
What's the code for if current page is secure. I can do it in JavaScript but I'm not that good at PHP. Here's the JavaScript var current_page = location.href; var current_page_is_secure = (current_page.indexOf("https://")>-1) ? true: false; I assume it's similar in PHP.
View Replies !
Remembering Current Page
I have a page entitled: show_abstract.php?Abstract_ID=1 which has a link to show_author.php?Author_ID=5 Now if user follows the link, he is redirected to show_author.php?Author_ID=5. If he updates the page by pressing the 'update' or 'cancel' button, I want him to be redirected to the page entitled: show_abstract.php?Abstract_ID=1 Now, how should I handle this, with a $_SESSION variable storing the current page link? or is there another smarter way of doing this?
View Replies !
Displaying The Current URL / Page
To insert the full URL of a current page (this is for a shopping cart "return URL"), I was using this: <? echo "$SERVER_NAME$PHP_SELF" ?> This worked fine on my old hosting server (PHP Version 4.1.2). Then I changed my hosting server (PHP Version 4.3.11) and suddenly it wouldn't work. But now I find this works: <? echo 'http://www.'.$HTTP_SERVER_VARS["SERVER_NAME"].$PHP_SELF.$_SERVER['REQUEST_URI']; ?> As a PHP newbie I suspect both are suspect.. Is there a way of doing this that I should get into the habit of using?
View Replies !
Refresh In Current Page
How to force a refresh in current page? Appreciate it if someone can show me the code. Reason: I have a page that allows user to change an image file. The image file is updated in the file directory. However, the 'old' image still shows in the current browser. The image will be updated only when I do a 'refresh' on the page.
View Replies !
POSTing Data To A Page Without Using A Form Submit.
I'm trying to send data to a remote script (a credit card processing third party) from my site using POST. Currently, I'm doing it using the ususal form dynamically built with my values. This is less than ideal because I want to perform local processing (updating order status in the local database) and then to proceed to the remote script, with resultant values, without relying on the user pressing a [submit] button. Code:
View Replies !
Causes For $_SESSION To Be Only Visible To Current Page?
I am working with PHP 4.3.8, Linux, and Apache 1.3.31 on a third-level or sub domain. The following code will diplay foo, session_id(), and increment count over refreshes: <?php session_start(); $_SESSION['foo'] = 'bar' $_SESSION['count']++; print_r($_SESSION); echo session_id(); ?> <a href="/test2.php">Next Page</a> But using the link to go to test2.php shows $_SESSION as undefined, not even an empty array. <?php print_r($_SESSION); echo 'Foo is registered? ' . session_is_registered('foo'); echo session_id(); ?>
View Replies !
Create Images From Within Current Page
I did a few searches but came up empty on this subject, although I may be blind. I know how to create an image and all that jazz ... but am having trouble figuring out how to generate the image on the fly (from inside a curent page) without it spitting out crap characters at me. I know you need to use the header content type of image/png - but that makes my whole page just an output of the image, as expected. Code:
View Replies !
Current Page Pagination Link
When you use pagination, how do you disable the link for the current page you are on?Example: <a >1</a> | <a href="pagination.php?pg=2>2</a> | <a href="pagination.php?pg=3>3</a> I think you would use some type of php_self code to do this, but I am not sure.
View Replies !
Login Refreshes Current Page
Currently, when a user logs into my site, they are directed to a specific page upon success. Now that I have added some depth to my site, I want users to be able to login from any page, and when the login program executes, they are brought back to same page they were at, but in a logged in state. Code:
View Replies !
Very Strange ... Reloading Doesn't Get Current Version Of Page
Very frustrated by a quirk in a normal html form submission (a search box). First it was getting no $_POST vars, though I checked the form method, and used print_r($_POST) to see. Eventually I realized that when I refreshed the browser it would not really refresh. For example I put in a phpinfo() call just to make sure I was editing the right search.php -- I refreshed and got the good old phpinfo. then I commented that line out. I refreshed and got the good old phpinfo anyway. I deleted the line entirely and still get it. So it's getting a cached version from somewhere... I can't imagine where; I've been building sites on this box for over a year and this is the first time I've seen anything like this.
View Replies !
How To Pass Current POST Data To Next Page ?
I got 2 php pages, called A.php and B.php. A.php will display all the selected records to the user and ask for confirmation before any attempt to delete. Let say the user click on the submit button, the action of the form is pointed to B.php. So my problem is, how can I pass all the current POST data in A.php to B.php as well ? I need that cauz the POST data in A.php contains the data needed like ID, to perform the deletion. I can manually write a VBScript to transfer the existing data into a query string and transfer it to the next page. However, it's not a POST data in nature. It wil become GET data right ? So what should I do ?
View Replies !
Preg_Match Source Code On Current Page
The problem is that if I set the variable $page_check to a file on our server to test it, every thing works as it should. But then when I place the script in a template file where the $page_check variable is set to $phpself - when loading a page with the script on I get firefox giving me a download box to download the current page file. So I figure I cant request a page to fopen a url which is the same url the script is on? So my question is how do I set up this script so it looks at its own source code, does a preg_match to find out what section its in? Code:
View Replies !
Getting Current Page Info Into The Query String
I have a drop down list in a form, in a PHP page, the form is displayed via 'echo'. The FORM ACTION tags looks like this: echo "<CENTER><FORM NAME='choose_lib' METHOD='post' ACTION='viewpix.php?ctPos=360&ctWid=109&hsp=1&loc= XXX '>"; When the user selects a name from the drop down list, which is dynamic, how can I get that variable into that ACTION url where it currently says XXX ? All I can think of is that I am going to need an intermediate page, and that doesn't sound very efficient.
View Replies !
Random Link Form Current Page
I have huge page of links, to whcih I am currently adding. I would like to add a "random link" button which would parse the current page, extract all URLs then load a random link.
View Replies !
Download Protect Script Getting Contents Of Current Page
I'm half way through a custom built download protection script that does various things. However this is the bit that isn't working.... $name = 'file.txt' $fulldownload = '/files/'.$name; header('Content-Disposition: attachment; filename="'.$fulldownload.'"'); header('Cache-control: private'); Instead of linking straight to the file in questions it actually prints the current page (HTML) and puts it in the txt file to download.
View Replies !
Show The Current Time At The Resort On His Home Page.
I have a client who owns a resort in the Philippines. This client wants to show the current time at the resort on his home page. How would this be done with PHP? Is it some calculation based upon GMT? I think (I'll have to check) that the Philippines is +8 GMT...so is that what you'd have to do: create a snippet that grabs the current GMT and add "8" to it?
View Replies !
URL Posting
I just need some direction as to a function that can help with this particular situation: I would like to create a script that acts like a browser and simply goes to a specific web (ie: http://www.whatever.com) address on a regular schedule (ie: 100 times a day). Any functions that emulate a web browser?
View Replies !
Posting With &
Our database stores the & symbol as & I have a select menu that queries the database based on the selection. A sample selection: <option value="Cats & Dogs">Cats & Dogs</option> After I click on Submit, the value gets posted as "Cats & Dogs." How can I keep it just "Cats & Dogs"
View Replies !
IP Posting
Is there a convenient variable for the server's IP? I was thinking of trying to have my wget crontab also post up a page that displays the server's (dynamic) IP, so I could access the box from school.
View Replies !
Posting Raw XML To PHP?
I want to post a XML file to a PHP program. I have seen programs using the following curl format to send the XML: curl =H"POST / HTTP/1.0 Content-Type: application/x-www-form-urlencoded Content-Length: 12 " -d"<top></top>" However, I am not sure what to code on the PHP end to accept the XML. I checked $_POST and it is empty. I know you can send the data by posting to a var, like ( -d"xml="<top></top>"").
View Replies !
Posting To Another URL
I can cut and paste the following into my browser URL address and have the script execute no problem: http://subdomain.domain.com/log?amo...;orderid=123456 the domain is another site. How can I run a php script on my server that will essentially post the above, but within my php script?
View Replies !
Posting To DB
When I post comments in a text area, an entry of "<img src="abc.jpg">" appears in the DB as "<img src="">" and when the DB results are displayed, it shows this "<img src="abc.jpg">" instead of the image. I'd like to display the image, what do I need to do?
View Replies !
Posting To Self
I have a page displaying data from a mySQL db which I want to filter. So I figured I could have a button and a couple of fields at the top of my page: 1. Date 2. Category I want to click submit, have the results filtered but on the same page. How do I do that?
View Replies !
Posting XML With PHP
I've Googled until I can't Google anymore! I found plenty of examples however none of them worked for me. Here is what I need to do: I need to POST XML to a remote server and receive the response back.
View Replies !
Posting RSS
i m looking for a free/cheap script that lets you posts RSS feeds on your site. the RSS feed i want to post on my site is from another site. so basically, i want to post whatever that site posts.
View Replies !
Posting From One DB To Another
I am curious, is it possible to post data from one db to another? (MySQL.) I have researched this a little bit and it seems like cURL is the proper tool, however I am not too familiar with it. I basically have a simple form that I want to concatenate into a string with a | delimiter, store it in a variable and then post it to another webserver using SSL which will explode it and create a record in the db with the array.
View Replies !
Posting Id
this is my doubt, i am having all the details of mobile phones(price , id ,model,type) in database. when i press a particular image ,the complete details of that image i have to retrive from database, <a href="details.php" ><img src="E:programfilesEasyPHP1-8wwwanchasonymodel610.jpg" width="125" height="125" border="0" alt="for details click me">
View Replies !
Posting
Is There Any Way To Submit forms at two different place .... like post=http://mysite.com/post.php and other one too post=http://mybrotherssite.com/post.php using a single form ?
View Replies !
|