HTTP_REFERER. Need To Capture URL Entered To Direct To Specific Page
I need to be able to capture the URL which the user has entered so that I may direct them to a specific page.
e.g. website is www.mainwebsite.com
However, I have several aliases for this website. If user enters www.specificsite.com (one of several aliases), I want to be able to capture that URL as a variable and open a specific page.
In this way, depending on the URL (alias) entered, I can direct visitors to specific pages on the site.
Is HTTP_REFERER the best way of doing this. If so,
what would be the code [I am not an experienced PHP programmer]
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
User Login - Direct To Specific Page
If im looking to make a login system, that when someone login in with a specific username and password, it takes them to a specific page, ex. login: world password: world page they must get sent to once logged in: world.php login: hello password: hello page they must get sent to once logged in: hello.php Can someone give me a start to it here please? been looking around but cant find a good explanation of it .
View Replies !
View Related
Capture PHP Form Data As One Page Html, Screen Capture, Or PDF?
There is a medical office that has a detailed online patient form. When they receive the form data, it is split into 4 to 5 pages. Their online form is one detailed page. Their IT person thinks that they should be able to get their form data as a screen capture--basically a picture of the form filled in--ONE PAGE. Is this possible at all? I've never heard of this. If this is possible, is their software that does this that one can buy?
View Replies !
View Related
Direct Glob() To A Specific Directory
This is some code I have foreach (glob("*.php") as $filename) { if (in_array($filename,$noshow)) { continue; } and I am wondering if I could tell the foreach array to look at a specific directory. Ex: foreach (glob("http://xxx/*.php") as $filename) { if (in_array($filename,$noshow)) { continue; }
View Replies !
View Related
Capture A Specific String
I have a data and i put it all together inside a variable called DATA, this is what inside of $DATA after i gather all the data that i needed. $DATA = " copyright of me and you 2007 and the others bread 15.22 44.97% crumbs 15.532 6.47% apple 146.932 6.555% coffe 83.72 6.537% thank you all friend and everyone data date and year 2007 "; i need to only capture this data and remove the others: bread 15.22 44.97% crumbs 15.532 6.47% apple 146.932 6.555% coffe 83.72 6.537% and split it and make each data inside another variable, like this : $a = bread 15.22 44.97% $b = crumbs 15.532 6.47% $c = apple 146.932 6.555% $d = coffe 83.72 6.537% can this be done? and also the data that i try to capture is random, but always with this type : letter - number - number like bread - 15.22 - 44.97% .
View Replies !
View Related
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 !
View Related
How I Check That His Username Entered And Password Entered Matches That In The Db.
when my user goes to log in, i'm pondering how i check that his username entered and password entered matches that in the db. Heres what i wrote: $query = "SELECT * FROM Members WHERE loginName='$username' AND password='$password'"; $result= mysql_query($query); $check =mysql_num_rows($result); if($check < 0) { echo "Error: Username or password did not match! Please try again!"; }else{ echo "Successfully Logged in"; But that returns this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fantasy/public_html/loginprocess.php on line 15 .
View Replies !
View Related
Direct To Login Page
how to prevent a user from downloading a file if he simply types a file name at the browser (eg. http://www.abc.com/myfile.zip). If this happens, the browser would direct the user back to the login page and ask him to login first before he can process.
View Replies !
View Related
Echo To A Specific Div On A Specific Page
Is it possible to echo something from a php file to a specific div in a different specific html file?If so, can you let me know how to specify where the data should displayed. $myName="john"; echo '$myName'//but i want to echo to a different page on a certain part of that page.
View Replies !
View Related
Web Page Capture / Compression
I'm working on an app where a page is created dynamically via a CMS, and I need to save the page similar to the way you can save a 'complete web page' via a browser. I need to save the graphics, links, embedded applets, flash, etc. Is there any way that I can use native PHP code to 'capture' the web page and maintain the functionality of the page?
View Replies !
View Related
Email Form Confirmation Page (review Entered Details)
Just for example, say it was a form that asked for someones name and favourite number (fav number would be a select list), took them to a confirmation page where they could review what information they entered. And then, it would email off. Normally when I have done an email form, I put form action="......./email.php" method="post". Code:
View Replies !
View Related
$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 !
View Related
How Do Methods $_SERVER['HTTP_REFERER'] And RewriteCond %{HTTP_REFERER} !^$ Differ?
1) How do methods "$_SERVER['HTTP_REFERER']" and "RewriteCond %{HTTP_REFERER} !^$" differ? Specifically, does this description for $_SERVER['HTTP_REFERER'] also apply to the .htaccess RewriteCond %{HTTP_REFERER} !^$ method: re: $_SERVER['HTTP_REFERER'] - The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. Code:
View Replies !
View Related
Go To Specific Page
I have a search box, then I put in search criteria, got a returned result. When I click on to view that result, I got a page that says "you have to login first". After I login, I want my page to go to that "result page" instead of the member page. Is there a way to do that?
View Replies !
View Related
Load A Specific Page
I now have a simple php stylesheet switcher. I will expand on it as my 'kung-fu' gets better,(using some of the ideas you guys posted in that thread), but for now, it will do. Onto my next quandary. Is it possible to always load a specific page or the same page into the browser every time a user returns to my site? I know you can use redirects to push them in a certain direction, but they look a little unprofessional. I'm looking to create something a little more seamless, and a hell of a lot more classy.
View Replies !
View Related
Getting A Form To Post To A Specific Page
How do i get it so that a form can be submitted and have the information post directly to a page that i can specify without having to use a database. I just want a direct post that inserts the new information at the top of a page already created. Basically so every time the form is filled out a new piece of information is above the last.
View Replies !
View Related
Make Sure User Is Referred By Specific Page.
I know this is possible because I have seen it in a few scripts before, but I forgot exactly how the language was put. I have a link on a page inside a password protected folder, lets call it domain.com/protected/hide.php. When the user clicks on the hyperlink, they will be redirected to domain.com/folder/page.php I want to write somewhere on page.php to be sure the visitor came from hide.php, otherwise display an error message. How can I do this?
View Replies !
View Related
Finding A Specific Area From Page Using Regular Expression
i have a bunch of html pages and i want to fetch records from them and i m really confused how i can do after working with regular expressions and other stuffs from last few days can anyone help me with this ? i have a pages with html and table all scatter there..now i want just specific table from the page and all records in that page, i was successfull somehow but still have problems ,here are they.. Code:
View Replies !
View Related
Two Usernames Are Entered
I have made a script where two usernames are entered into a form and then these are put in the database however it is not working. I get no error message or anything, the names just don't get put in the database. here is the code for the form. HTML Code: <form name="form1" method="post" action="addfriendprocesssub.php"> <p> Username One<input type="text" name="usernameone"> </p> <p> Username Two<input type="text" name="usernametwo"> </p> <p> <input type="submit"> </p> </form> ..................
View Replies !
View Related
Getting The Id Of The Last Entered Record
I have two tables, a 'users' table and a 'log' table which is used to store all user activity such as login date and times. When the user is registered, I execute an 'INSERT' SQL statement and a user_id is generated automatically for that user, since the field user_id is set to auto_increment. Now, when the user registers, I also need to add the first log to the 'log' table from the same PHP registration script. The 'log' table has these fields: 'log_id' (auto generated), 'user_id' (a user id) and 'msg' (with the actual log as a string). I need to add the folowing record: INSERT INTO log (user_id, msg) VALUES ('xx', 'Registered at $datetime'); I need to get the auto generated user_id from the previous INSERT command to replace the 'xx' I tried mysql_fetch_array after executing the insert command but I was not successful. afaik, ASP lets you to do this. Is there a way to do this with PHP without having to execute another SQL statement to fetch the last entered record?
View Replies !
View Related
Sending People To Specific Pages That Are Coming From Specific Pages...
I want to show some specific pages to people that comes to my site from specific urls, I know the variable $_SERVER['HTTP_REFERER'] will be used but how? For ex if the visitor comes from a site that is like: I want to send this person a specific.php . I used below code but not worked: <?php if($_SERVER['HTTP_REFERER'] == "www.cominghost.com" || $_SERVER['HTTP_REFERER'] == "cominghost.com" || $_SERVER['HTTP_REFERER'] == "www2.cominghost.com"){ // Specific page html goes here } else { header("Location: index.php"); } ?> This code not worked for some cases like if the visitor comes from http://www.cominghost.com/account/targeturl.php or http://cominghost.com/account/targeturl.php Ok I know the if statement not working but How?
View Replies !
View Related
Need To Re-direct IE 6 (only)
I have the following code but I'm not familiar with PHP. All I need to do is re-direct IE 6 ONLY. (What I REALLY need to do is break out of a frame-set, if there is one, for IE 6! But if I can just re-direct IE 6 to a special "IE 6 only" page I could have that page break-out of the frameset). Just a basic "if - then" re-direct based on if the client is IE 6 or not. Please help me out (or I'll be forced to point to another server where I have the IE 6 re-direct in ASP!). I wanna use PHP for this simple task but I'm not up to speed on PHP at all! Code:
View Replies !
View Related
How To Show Only Entered Fields ?
I am getting lost in showing data entered in a form to a confirm page. I have a form with as many list/menu as the categories existing in the database. DONE when user choose the items from the list/menus they are passed on to a second page where he can check if all data are correct and then send it. DONE However on the confirm page the script returns also empty lines of text for the missing fields. I would like to just have the fields entered by the user one after each other and not as they were on the first form. How can I get rid of the empty fields ? ( of course just removing the <BR> tag is not a solution ) I post the code of both pages below ( only the part of interest ) <form name="form1" method="post" action="send.php"> <p>Please check the data u entered</p> <p> <input name="hiddenField" type="hidden" value="<?php foreach ($_POST['field'] as $name=>$value) { echo nl2br("$value"); } ?>"> <?php foreach ($_POST['field'] as $name=>$value) { $split = split("=", $value); $pieces = explode("=", $value); echo nl2br("$pieces[1]<BR>"); } ?> </p>.....
View Replies !
View Related
Avoid Too Many Slashes Entered
I have Phpdev running on my local machine. On my local machine php inserts slashes without me put in the coding " addslashes() ". On my live server php doesn't automatically add the slashes. I tried using the addslashes(). On my local machine it added the name exactly like this in the DB Da'an into the DB. On the live server I only got 1 single slash. I have the stripslashes() on the page that displays the names. It displays that name of Da'an with only 3 slashes on the page...Bin Da'an. My local machine is running on PHP Version 4.2.3 & the live server is running PHP Version 4.3.10 How do I fix this so I won't be having too many slashes entered.
View Replies !
View Related
Zero Entered Into Mysql Table
i am trying to update my mysql table with a drop down box (changed from a text box) but when i click submit i get a zero entered instead of the id number of the option: I am trying to update the field called "bed". i have a table that stores a yes no value in it (will be others just trying this for testing purposes. Quote: CREATE TABLE `categories` ( `id` int(11) NOT NULL auto_increment, `title` varchar(50) default NULL, `description` text, `image` varchar(50) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=23 ; -- -- Dumping data for table `categories` -- INSERT INTO `categories` VALUES (14, 'Yes', '-', ''); INSERT INTO `categories` VALUES (15, 'No', '-', '');............
View Replies !
View Related
Close When No Data Has Been Entered
I just started learning PHP a couple of days ago and right now I'm writing a script to insert tutorials into a database. Everything works fine, except that when someone visits "insert.php" it enters empty fields into the database, while it shouldn't enter anything. And when someone refreshes the page after submitting, the data will be entered again. Code:
View Replies !
View Related
PHP Self Submit, Then Re-direct
I as the thread name indicates, i have a form that is a self submiting form. I was thinknig of breaking this up into a form handler, but i have about 50 drop down box's that need to be insterted into 4 different mySql databases. So my form will stay self submitting. But the problem i run into is after the form has been submited i want the page to then re-direct to a page that says that the form has been submited.
View Replies !
View Related
If Statement Re-direct
can I get php to load a new page using an if statement e.g. if ($var = "true") {code that moves browser to nxt page}; sry if this seems unclear im not sure how php would go about doing such a simple thing.
View Replies !
View Related
Direct Apache
Developing a small site with PHP...For dev purpose, I need to tell Apache where my php files are. Something to do with htdocs or docroot, but I can't figure out what to do...
View Replies !
View Related
Separate Strings Entered By New Line
I have a textarea where I am entering multiple strings. If I enter the strings by comma or space or some other operator then I am getting able to separate them by the explode function. But if I enter the strings in new line then I am not getting able to separate them. In the textarea I have entered like: example-1.com example-2.com example-3.com So, now how can I separate them using explode..?
View Replies !
View Related
|