
pkSML
Members-
Posts
191 -
Joined
-
Last visited
Everything posted by pkSML
-
I used to use Syn, now I use PSPad (both FREEware!).
-
Did you get my PM I sent you? If you send me comments.php (from /talkback), I can hard-code the form action attribute and send it back to you. Notice this code from the HTML code you posted above: <form id='tb_form' name='tb_form' action='/talkback/comments.php' method='post' onsubmit='return validateForm(this.form)'> The action attribute should be action='/feedback.php'
-
Whoops... Just re-read your first post. You'll need php, not HTML for the redir page. When they login, send a location header like this: redir.php?http://redirect.to.here.com Then redir.php will do the meta-tag refresh to take them to the URL in the query string.
-
Maybe you could make an intermediary webpage. Redirect them to redir.htm with the PHP location header. Then in redir.htm, use a meta-tag refresh to point them to the logged-in location.
-
Great! Make sure to mark this topic as solved.
-
How are you redirecting? PHP header? If PHP, what is the HTTP status code?
-
One thing to check... After a successful login, go to File -> Properties and check the URL for the page. Sometimes the browser, for whatever reason, does not update the address bar after a page change though you're actually at a new page.
-
Add a PHP header to the page that makes the browser refresh. <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> Source: http://us2.php.net/header Oh, and by the way, headers must be sent before any HTML output. I.e., put the code at the beginning of your PHP file.
-
I see what you mean that it's not centered exactly. I wouldn't have noticed otherwise, though. You could use CSS for <div id='tb-wrapper'> to give it a margin. #tb-wrapper { margin: 0px 0px 0px 20px; } /* The syntax is top, right, bottom, left */ You can toy around with that. Actually, I think the problem is with your table that holds everything beneath the header. Maybe make a table cell for each row that acts as a spacer.
-
session.cookie_path is where the session data will be saved. Maybe you don't have write access to the default save path. In my php.ini, the save path is also /, but it defaults to c:\documents and settings\myname\local settings\temp. I've heard of other people having trouble with the save path. You might try hard-coding this variable to a directory on your hard drive. You might try googling the problem.
-
Thanks frost110 for bringing this to our attention. To get around the localhost problem, here's a simple solution: Go to www.dyndns.org and register an account. Then give yourself a sub-domain name like http://apachetester.dyndns.org with their dynamic IP service This service is free, just requiring you to update your IP address once a month. We used it for our church site (http://calvarybaptist.homedns.org) before we got a domain name.
-
You can find some links explaining https here --> http://stephen.calvarybucyrus.org/search/https+site%3Ahowstuffworks.com
-
Are you using IIS? IIS is rather buggy with sessions. See http://www.sitepoint.com/forums/showthread.php?t=461479 (It's a long thread, but the author found a hack solution) The author of your script is using Apache on a Unix server. http://www.google.com/search?hl=uk&q=PHP+sessions+problems+IIS
-
Touch does not create files --> "touch -- Sets access and modification time of file". The fopen function will create a file is it does not already exist due to the 'w' argument. It will write to the filename. About the 'w' argument in fopen:
-
Try this: <?php for ($n=0, $n<10, $n++) { $filename = $n.".php"; $ourFileHandle = fopen($filename, 'w') or die("can't open file"); fwrite($ourFileHandle, "add file contents here"); fclose($ourFileHandle); } ?> Just added a little bit to MadTechie's code above.
-
thumbnail code / saving image to different directories
pkSML replied to hellonoko's topic in PHP Coding Help
This *might* help --> http://en.wikipedia.org/wiki/Path_(computing) You want to use a relative path like mcastles said. If the code is in /resize/ and you want to save thumbs in /resize/thumbs/, then $save = './thumbs/t_'.$file; -
You may need to refer to a functions tutorial. Many good links --> http://stephen.calvarybucyrus.org/search/php+function+tutorial http://www.tizag.com/phpT/phpfunctions.php
-
[SOLVED] Need to reformat standard numerical date (Y-m-d) to words
pkSML replied to vynsane's topic in PHP Coding Help
Here's a rather simple solution. $month_num = (int) $_GET['month']; $months["1"] = "January"; $months["2"] = "February"; $months["3"] = "March"; $months["4"] = "April"; $months["5"] = "May"; $months["6"] = "June"; $months["7"] = "July"; $months["8"] = "August"; $months["9"] = "September"; $months["10"] = "October"; $months["11"] = "November"; $months["12"] = "December"; echo "$months[$month_num]"; -
You're welcome. Glad it's fixed for ya'!
-
That's very awkward. It must be the format of the HTTP header. Can you grab the application's HTTP request headers? Sounds like PHP automatically does this. Here is a post header made at http://stephen.calvarybucyrus.org/contact POST /contact/sendmail_simple.php HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */* Referer: http://stephen.calvarybucyrus.org/contact Accept-Language: en-us Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322) Host: stephen.calvarybucyrus.org Content-Length: 149 Connection: Keep-Alive Cache-Control: no-cache name=stephen&[email protected]&subject=testing+http+headers&message=just+testing+this+message+to+see+how+a+proper+post+request+is+made I'll guess your problem is in how many carriage returns are separating the header and the post information. Also check out: http://www.jmarshall.com/easy/http/#postmethod
-
That's not true. It doesn't "look" good, but it's valid. Guess you're right! I learned something new today.
-
That explains the popularity of PHP! It doesn't require much thinking and is therefore easy. There's a function to do it (ie everything) for you. LOL.
-
One thing to note: echo"<FRAMESET --- there must be a space between echo and the double quote. The Body tag does belong in every valid HTML document (http://www.w3.org/TR/html4/present/frames.html). For future reference, turn on error reporting. <?php error_reporting(2047); ?>
-
I learned Perl first. It was a fun learning experience. At first thought, I would never use PHP. But, with about 6 months behind that first opinion, I'd say PHP is extremely more user-friendly for writing webpages. I don't do much of anything with Perl anymore. I think you could learn both languages at the same time. The basic connection is with regular expressions. PHP has many PCRE functions (Perl-compatible regular expressions). For learning PHP, I'd suggest reading the manual (duh!). Get to know the functions for different types of operations. Google, the PHP manual, and code examples are the best ways to learn.
-
De nada! Did you try this: <?php echo "<PRE>"; print_r($_POST); echo "</PRE>"; ?> This will output all POST variables. Most likely, variable names are getting mixed up. This is very easy to do. I would recommend getting ieHTTPheaders and you can see all HTTP headers (and post data). Very useful tool.