OK, so this is my problem.
I'm trying to load an inline container using ibox. Basically it works fine, as long as when calling it, the URL is in the following structure: www.domain.com/likes.php (when clicked it produces www.domain.com/likes.php#inlin e_container
However if the domain is in the structure www.domain.com/likes/24 due to rewritable URLs, this doesn't work anymore (when clicked it produces www.domain.com/likes/24#inline_conta iner...
User Profile
Collapse
-
Calling a DIV from <a href and having a rewritable URL
-
Awesome. How could I have missed that! Thanks :) -
If I submit "dad" I get this output:
string(3) "dad" bool(false)Leave a comment:
-
Okay, I submit "DonVito" in the form and I get this output:
string(7) "DonVito" bool(false)Leave a comment:
-
-
Thanks. However it's still unsolved.
Code:$homeID = "DonVito:"; if ( strpos( $postcontent, $homeID ) === 0 ){ header("location:result.php?p=$postcontent&mail=Sent"); } else{ //redirect back to site header("location:result.php?p=$postcontent&debug=noMailSent"); }
Leave a comment:
-
Why is the strpos function always returning a false?
Ok, so I need to make the PHP form detect whether a string starts with the substring "DonVito:" or not. However, it's always returning a false even when DonVito: is present.
Code:<?php $host="localhost"; // Host name $username="****"; // Mysql username $password="***"; // Mysql password $db_name="*******"; // Database name $tbl_name="post";
-
Yep. In fact I fixed it to use $myusername instead of the original variable.
Thanks again guys! :)Leave a comment:
-
Okay solved it. Problem lied in
Code:$_POST['myusername']
Thanks for the help though :)Leave a comment:
-
No. Still doesn't create it...
Modified code is like this:
Code:if($count==1){ //Create cookie $hour = time()+3600; header("location:index.php"); setcookie('ID_group_planner', $_POST['myusername'], $hour); setcookie('Key_group_planner', $_POST['mypassword'], $hour); } else { header("location:index.php?login_error=1"); }
Leave a comment:
-
-
Well that is the whole script. There is absolutely nothing else in the login.php file. Unless I understood you incorrectly that is.Leave a comment:
-
Why is cookie never set after login validation?
Ok, so far I have always used JSP and Servlets for my web programming, but now I needed to make use of PHP... and I'm stuck at something really basic: setcookie.
The form works fine, and it checks with the database for the username/pass ok (because when I supply good credentials I return back to the homepage, and with bad credentials it appends the error parameter with the URL).
Anyway, the cookie is never set. The browser...
No activity results to display
Show More
Leave a comment: