The Page Isn't Redirecting Properly
Host: Dreamhost
Access: Shell & FTP
I setting up a site but it seems to not like php extensions. I have a custom php running in my root folder. Cgi-bin has php.cgi in it for this.
Whenever I go view the site i give me this message
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.....
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Redirecting Url To Another Page
i have three files: 1) calculat.htm 2) calculat.php3 3) out.php3 here calculat.htm contains the form , when i am submitting that form it goes to calculat.php3 there calculation will be done, and then it redirects the out.php3 file.
View Replies !
View Related
Redirecting The Page
I am using unset() to unset the session variables during logout page. When i click the logout button and when i click the back button, it showing the last page which i accessed but whn i click refresh or when i try to access the page its redirecting me to login page as the session variables are expired. I dont know why its not redirecting automaticaly once i click the button.My code:
View Replies !
View Related
Redirecting A Page
I have a page that sends a request to another PHP page on my site. If I try and set the header in the page that is being called, with header(Location: ...), the site doesn't get redirected like I'd like it to, it just writes a response to the original page. The response that it writes is the HTML of the page that I'd like the site to be redirected to. Is there a way that I can redirect from the script that is being called through an xmlRequest?
View Replies !
View Related
Redirecting To Another Page
I am trying to create a dice game in PHP and it requires the randomization of the dice. My problem is: if the player does not like his dice he can "refresh" the page or "go back" a page on the browser, to generate different dice. What code could I put in my PHP so that if the player clicks the "refresh" or "back button" on the browser, the browser would either stop it, or redirect to another page?
View Replies !
View Related
Session :: Problems With This Web Page Might Prevent It From Being Displayed Properly
when i add php session <? session_start(); header("Cache-control: private"); // IE 6 Fix. ?> I just get this error "Problems with this web page might prevent it from being displayed properly bla bla". Of course am adding those lines just the first thing in each page b4 anything else. so am getting that error in pages that have template applied to it. and when i delete the session lines it just back to normal. So i dont get whats the problem with the session.. there is no other way of writing it. and the session is working already properly in another project on same computer. am using php & IIS.
View Replies !
View Related
Redirecting User To New Page
I am very much a new user and have a basic question. When the data is successfully submitted into the database, the script echos "Successfully submitted". If, instead, I wanted to redirect the user to another page, "confirm.php" , when the data is successfully submitted, how would i do that? PHP Code:
View Replies !
View Related
Redirecting To Page Based Upon Usename
Is there any tutorial or code where i can find the the information on how to redirect to a page depending upon the user. For example The first page has a form which contains username and password, after submit it is redirected to page base upon the username. Such as if the user is john then it will direct to john.php or user joe will go to joe.php.
View Replies !
View Related
Redirecting To A Full Page Window
I've been tying to escape frames and redirect to a new window. I've been employing a javascript like this to open the window up: <SCRIPT LANGUAGE="JavaScript"> <!-- if (window!= top) top.location.href = location.href; // --> </SCRIPT> I know I need AJAX to accomplish what I want but how do I apply this or can someone refer me to a tutorial?
View Replies !
View Related
Redirecting To Old Page When Error Occured
I have a problem i need to display error when the data insertion leads to erronius input on the top of the same page. PHP Code: $insqry1="insert into blue_insuranceclaim(insurance_compname,company_url,phone1,phone2,email) values('".$compname."','".$website."','".$phone1."',".$phone3.",'".$email."')"; //echo $insqry1;die; $insertcoupon = $db->Execute($insqry1); if(mysql_error()) { $_SESSION['errMessage']="Please enter correct values"; header("Location: addclaimpage.php"); }
View Replies !
View Related
Redirecting The Page - Cannot Modify Header Information
I have one doubt regarding redirecting the page.. If I run the redirect code that is header("Location: www.sampels.com") in the local server it works well but If I upload the same PHP file to the web server It gives warning and didnt work. Warning: Cannot modify header information - headers already sent by (output started at /usr/local/etc/httpd/htdocs/project/index.php:7) in /usr/local/etc/httpd/htdocs/prjoect/index.php on line 108 what can I do to do solve this problem.. please can anyone help me.
View Replies !
View Related
Why Mysql Isnt Connecting
trying to get php to connect with mysql so that I can start querying db(running locally on my machine and php works fine) however I'm having trouble. This is the error it spits out- Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using password: NO) in D:phpwebconnect.php on line 5 Unable to connect to MySQL Could anyone assist me on this matter.
View Replies !
View Related
Isnt ^ Common Regex Notation?
isnt ^ common regex notation? keep getting this error: Parse error: syntax error, unexpected '^' Code: $goalsheet.=preg_replace("/^[0-9]+ Year Career Goal #[0-9]+: *$", "/^<span class=hd2>[0-9]+ Year Career Goal #[0-9]+: *</span><br>$/", $goallist); aside from the error, i think the regex is off, but i hav had a hard time finding a tutorial that explains how I can ignore text in the middle. Here are some examples of what i'm trying to do: "1 Year Goal #1: Web Developer" -> "<span>1 Year Goal #1: Web Developer</span><br>" "10 Year Goal #2: IT Consultant" -> "<span>10 Year Goal #2: IT Consultant</span><br>" suggestions?
View Replies !
View Related
INSERT Code Isnt Working.
This probably has a really simple answer, but my INSERT code isnt working. mysql_query('INSERT INTO `members` (`id`, `uname`, `uemail`, `upass`, `GUID`, `data`, `permissions`) VALUES ('NULL', $psuser, $psemail, $psPassword, 'NULL', 'NULL', Ƈ')'); And I get an error saying unexpected T_STRING .
View Replies !
View Related
How Do Sessions Work Cos Mine Isnt Working?
How do sessions work cos mine isnt working i got this: on a different page i have : $_SESSION['referer'] = '1'; then: if ($_SESSION['referer'] == '1'){ include ("include.php"); } but when i echo session it is blank =/ what did i do wrong.. i got many other sessions on the go so it should work..
View Replies !
View Related
Script Isnt Pulling The Basename From Upload
This upload script im using for some reason wont pull the file name and database it when you go to upload a file and it wont upload the file either... I used this script before and got it to work but for some reason it wont work now.. I checked the other forms and they still work so i must be missing something in the script. Code:
View Replies !
View Related
Simple Image Upload Isnt Working?
im working on a simple image upload script (my first try) well i noticed that for some reason its not even recognizing a file being uploaded...ive tried using the phpfreaks simple image upload tutorial but that wont seem to work for me. Code:
View Replies !
View Related
INSERT Short Record = Fine, Long One Isnt
I have a mysql database table that I created by copying another one in phpadmin. The first table works fine. the second table works fine when I insert a short record, but when I do a long one it doesn't appear in the database. any idea what I'm doing wrong? It's not that its truncating the record, there is nothing there.
View Replies !
View Related
Login Page Not Redirecting After Login
I've used this same snippet of code in other login forms without a problem (with some slight modifications from script to script) but this one seems to baffle me. Basically it takes the login and validates the entries (validation works, error messages display if left blank), then checks the database for a match. If there's a match then it is supposed to forward the person onto the proper page using the 'header' function. Problem is it's not. Basically it's reverting back to the 'index.php' page (login page) and the display is completely blank. Here's the code for index.php: Code:
View Replies !
View Related
PHP Not Refreshing Properly?
I try to add, update, or delete anything from something stored in mysql and try to call the mysql database from a different php page whenever I try going to the php I have to hit refresh for the new results to appear. My question is why is this and how do I fix this? For example I try to add a news article.. The next php you successfully added a news article bla bla click here to view what you posted.. . When I do the click here it takes me to the page that calls from the database and what i just added is not there... not until I hit refresh? Oh and I am looping.
View Replies !
View Related
Redirect Properly
I am using the below code, what it is suppose to do is when a banner is click that it ads 1 to the database and upon completion of that it is suppose to select the url that matches the banner and redirect to that page, but all it does is go to a error page that says page cannot be found, what am I doing wrong? PHP Code:
View Replies !
View Related
Php.ini Not Working Properly
I've been trying to set up a file upload script. Everything's working fine, except that files over 2M won't work. So I changed the following values in php.ini: memory_limit=50M post_max_size=50M upload_max_filesize=50M and restarted the server. this should allow uploads up to 50mb, but nothing actually changed: The phpinfo() function displays the default values for those directives, not the new 50M values. I then proceeded to change max_execution_time (to see if I was editing the correct php.ini file) and sure enough, after restarting the server, phpinfo() returned the new value for max_execution_time, while post_max_size and upload_max_filesize remained the same (8M and 2M, respectively).
View Replies !
View Related
Using $_GET Properly
I'm just trying to create a page that will display a certain Flash movie with a certain width and height based on queries in the URI. The HTML is simple: <object width="<?php $_GET['width']; ?>" height="<?php $_GET['height']; ?>"> <param name="movie" value="http://sumeetjain.com/wp-content/uploads/<?php $_GET['movie']; ?>.swf" /> <embed src="http://sumeetjain.com/wp-content/uploads/<?php $_GET['movie']; ?>.swf" width="<?php $_GET['width']; ?>" height="<?php $_GET['height']; ?>"></embed> </object> So if I go to the page (flashmovie.php), it should read from the URI, like this: flashmovie.php?movie=funinthesun&width=400&height=350 The problem I'm having is that nothing is showing up in the HTML for the fields where I put in the PHP. It's as if the $_GET values are all blank.
View Replies !
View Related
Closing A PHP Script Properly
Hi I'm using a PHP script with socket connections to transfer data between the browser and an application. It uses server push to display the data, so this means that the connection stays open as long as the user doesn't press the Stop button. However, when the user aborts the data stream (i.e. pushing the browser's Stop button), the socket server still thinks the connection is open and keeps sending data, which causes the server socket application to crash. I know there have to be techniques to prevent the crash on the server side, but I was wondering if there is a way to make a script send "a last command" before the connection is actually broken (in my case, the fclose command)? Thanks
View Replies !
View Related
Include Not Working Properly
What I have is 3 separate database driven pages that I want to include into one page (footer), that I will include on every page of my site. So far I have had succes with the individual pages getting data from the database but when I include them together (in a footer page) it appears that data is getting repeated where its not supposed to be. Here is my stuff: Page 1: <? $db_name = "octanner_web"; $table_name = "expert_panel"; $connection = @mysql_connect("localhost") or die("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "SELECT txt, url FROM $table_name ORDER BY txt "; $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { $id = $row['id']; $txt = $row['txt']; $url = $row['url']; } $display_block = " <a href="$url">$txt</a><br> "; ?> -------------- Page 2: <? $db_name = "octanner_web"; $table_name = "news"; $connection = @mysql_connect("localhost") or die("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "SELECT id, title, url FROM $table_name "; $result = @mysql_query($sql,$connection) or die("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { $id = $row['id']; $title = $row['title']; $url = $row['url']; $display_block .=" <a href="$url">$title</a><br> "; } ?> -------------- Then my footer: <img src="../images/bar.gif" width="500" height="5" border="0"><table border="0" cellpadding="5" cellspacing="0" width="500"> <tr> <td><?include ('carrots.php'); ?></td> <td><?include ('news.php'); ?></td> <td><?include ('olympics.html'); ?></td> </tr> </table>
View Replies !
View Related
If Loop Does Not Function Properly ...
when nested inside of a for loop. I am trying to display information based on the day of the week, which is determined by the for loop. If there are multiple entries for the same day, the if loop will only display the first entry and then exit the loop without printing the second entry. I am very confused because because seperately, the for loop and the if loop function properly.
View Replies !
View Related
If() Statement Not Working Properly
Ok...I'm not drunk...I don't think, but I can't get this simple, simple script to work. Been looking at it too long. In the included code, the $nothing variable shows up no matter what. It is supposed to show up only when there are no matches to search criteria. Can anyone help?
View Replies !
View Related
Cannot Get Nested For/while To Work Properly
I feel like this should be extremely simple, but I cannot for the life of me get it to cooperate. Part of one of my functions pulls data out of a database and build an array, but the index variable doesn't seem to be available within the while loop. for($i = 0; $i < $numAlts; $i++) { while($row = $db->sql_fetchrow($result)) { echo $i; $tempArray[($row['name'].$i)] = array('name' => $row['name'].$i, 'value' => $row['value'], 'show' => $row['show'], 'required' => $row['required']); } array_push($array, $tempArray); } the echo was put in there to help me debug the thing. It should be echoing 123... but instead it echo's 00000000. The nested loops work fine, exiting when they should, but every row has the same name eg Name0. Is there some weird PHP variable scoping that I'm not aware of?
View Replies !
View Related
Include() Not Working Properly
I've been running a XAMPP server for some time now, but I just tried to add an include, and it says: Warning: include() [function.include]: URL file-access is disabled in the server configuration in M:Serverhtdocsdesktopsearch.php on line 12 Warning: include(http://www.google.com) [function.include]: failed to open stream: no suitable wrapper could be found in M:Serverhtdocsdesktopsearch.php on line 12 Warning: include() [function.include]: Failed opening 'http://www.google.com' for inclusion (include_path='.;M:Serverphppear') in M:Serverhtdocsdesktopsearch.php on line 12 I have opened up php.ini, and set allow_url_include = On . allow_url_fopen was already allowed. Yet whenever I run phpinfo(), it reports that allow_url_include is Off both locally and in the master. I have already changed php.ini, and restarted the server, but it does nothing.
View Replies !
View Related
Sessions Not Passing Properly
I use sessions as part of my login script. One of the values passed is userid. The userid seems to pass fine into the main part of the page, but when I use userid in a navigation include I cannot get it to display. Here' what I mean. Code for admin navigation: function adminMenu(){ echo $userid; @$result = mysql_query("SELECT menuid,menulabel,menuname,url,parent from crc1.tbluspmatrix u, crc1.tblmenu m where u.privid = m.priv_id and u.userid = '$userid' AND parent = Ɔ' AND module_id = Ƈ' AND view= Ƈ' AND position=Ɔ' ORDER BY lorder ASC"); @$counter = 0; while ($row = mysql_fetch_array($result)){ $path = $_SERVER['PHP_SELF']; @$class = ( $row['url'] == $path ? 'td_select' : 'td_root' ); echo '<td width=" " valign="top" class="'.$class.' " style="border-right-width: 1px;border-left-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border- color: white; border-style: inset;vertical- align:middle;"> <a id="a_root_'.$counter.'" border="0" style="cursor:hand; text-align:top;"> <a class="'.$class.'"onMouseover="this.style.color='black'" onMouseout="this.style.color='white'" onMouseout="this.style.color='white'" href="'.$row ['url'].'">'.$row['menuname'].'</a> </td>' }//end while return; } ?> I tried echoing out the $userid value, but it did not work. The page that this include is included in does have session_start() at the top. I even tried using session_start() at the beginning of the above function, but that did not work. As I said earlier in the post, the userid does seem to pass properly to the page mycrc.php, but not to the adminmenu_func.inc (which is included in mycrc.php).
View Replies !
View Related
PHP 5 Extension Not Loading Properly.
I've got an extension that I coded as a DLL in Windows and can use the dl() function to load it with no problem. This makes my test functions available and everything works fine. I'd like to keep the DLL resident in memory and tried adding it to PHP.INI (and don't call dl() ), but the functions in my DLL aren't available to my PHP script. Is there something special I need to do? I don't want to recompile PHP with my code - I can't think of a worse way to spend the holiday weekend...
View Replies !
View Related
$_GET Not Working Properly
.htaccess Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)$ index.php?user=$1[nc] http://tzfiles.com/album/Ryan header.php <?php echo'Viewing ('.$_GET['user'].''s) Profile'; ?> The above code echo's out index.php, I need it to echo out Ryan. I can't figure out what is wrong, and why it is doing this. I'm not sure, but I think it is something to do with the .htaccess file. header.php is in the root folder, the .htaccess is in a sub folder, and an index.php file is in the same folder as the .htaccess file. the index.php file includes the header.php file like so: include"../header.php";
View Replies !
View Related
Charector Not Diplaying Properly
im using oscommerce and i installed wordpress into it. All is well.. but since ive installed wordpress pound signs and single quotes are displayed as question marks. The include code is: define('WP_USE_THEMES', false); require('./wordpress/wp-blog-header.php'); Which goes into a file called applicaiton_top.php I believe i has something to do with the headers.
View Replies !
View Related
Properly Design A Database
does anyone know of any good online articles about really basic info on designing a databse structure, as well as normalization? I've done some applications before but I really want to learn the proper way to plan out my site, including the relationships, etc. I'm obviously using PHP and MySQL.
View Replies !
View Related
Mail() Not Working Properly
<?php $to = "west.jamie@gmail.com"; $subject = "Jamie Wests Survey Results"; $header = "from west.jamie@gmail.com 'X-Mailer: PHP/' . phpversion();"; $message = "NAME: {$_POST['firsname']} {$_POST['surname']} DOB:{$_POST['dob']} Year in school: {$_POST['year_school']} siblings: {$_POST['siblings']} bedtime: {$_POST['dob']} homework time: {$_POST['homework']} tv time: {$_POST['tv']} computer time: {$_POST['computer']} family time: {$_POST['family']} time with friends: {$_POST['friends']}"; $message = wordwrap($message, 70); mail($to, $subject, $header, $message); ?> it sends me the email, but misses out some of the message, anybody got any idea y?
View Replies !
View Related
While Loop Not Indexing Properly
I am having a problem with a while loop. All information comes out correctly except when it should index the team_id it doesnt. I cannot figure it out. I even tried 2 left joins and got the same thing. When the loop gets its info from the above query, it does everything properly except the team_id. It has to be something simple. Code:
View Replies !
View Related
Decimal Places Properly
I apologize if this is in the wrong forum, couldn't find one specific to mysql or database questions. Hopefully someone will have a suggestion however as I'm slowly going crazy over this. What I want is is to store as many decimal places as possible into a mysql field without; 1) rounding and 2) redundant zeros. Regardless of how I manipulate the float, decimal, or double fields, (30,31) seems to be a magic number as it's always defaulting to this. The 30M is hugely a wase of space for me in this application (5, 56) would be much better. as an aside, how do I instruct the database to perform the same as the default FLOAT? i.e. When an entry is 1.00123 I'd like it to appear as such, not 1.00123000000000000000000000 .
View Replies !
View Related
|