-
Posts
4,268 -
Joined
-
Last visited
Everything posted by BlueSkyIS
-
I have had this problem before but it fixed itself...
BlueSkyIS replied to gergy008's topic in PHP Coding Help
i don't like messing with all those details of mime types, etc. i suggest that you use an existing email class to make things simpler. i use rmail. if you follow the example scripts included in the download, it is very easy to set HTML, add attachments, etc. http://www.phpguru.org/downloads/Rmail/Rmail%20for%20PHP/ I understand that your question relates to HTML and not attachments, but rmail does a great job of making HTML emails simple whether you add attachments or not. -
one possibility is readfile(), which can pass a file to the browser without exposing the path to the actual file. http://php.net/manual/en/function.readfile.php
-
sessions. hidden fields can be manipulated MUCH easier than session data. you'll be using sessions to track the user through multi pages anyway, so you can keep their info in session variables OR store to database in case they leave without completing portions.
-
Not exactly. The point is primarily avoiding bogus data. It is very easy to turn off javascript and enter anything (or nothing) and submit a form. spam bots don't even use javascript, so they will send you as much email as you can handle without thinking about any browser-based validation.
-
Things move around and change after signing up?
BlueSkyIS replied to pappakaka's topic in PHP Coding Help
only way to tell is to view the HTML source and compare before and after; validate the HTML of both, and see what changed from one to the other. -
flush may or may not work for you. http://php.net/manual/en/function.flush.php
-
post the error so we know what it is.
-
do you have session_start() at the top of the code?
-
new install of xampp ... str_pad() expects parameter 4 to be long
BlueSkyIS replied to dsdsdsdsd's topic in PHP Coding Help
STR_PAD_LEFT is a constant. if you put quotes around it, it becomes something different. remove the quotes // FIXED $lvs_result = str_pad( 1 , 4 , 0 , STR_PAD_LEFT); -
if you store the value as datetime, you can reliably pull it from the database and use date() function to put the Z wherever you need it by escaping it with a backslash: \Z
-
mysql stress is the least of the worries. but, sorry i don't know how to make it work. maybe this bump will help.
-
if (stristr($title, ':')) { continue; // go to next element }
-
yeah, only beginner developers here. teeheeee :-P with the method you describe, using php.ini and .htacess, there is then the assumption that php.ini will be parsed and used. that is a very poor assumption, as many hosts will ignore php.ini, or require that PHP ini settings be placed into .htaccess, and then the .htaccess php settings that work in one .htaccess may crash on another server. the method described above is used very often for product installations.
-
Problem building menu from mysql and do-while
BlueSkyIS replied to andresfz87's topic in PHP Coding Help
my post was an example. you still need to add the loop within that loop. another example: while ($row_subsections = mysql_fetch_assoc($subsections)) { // do something with $row_subsections } -
i think you need to start with some basic tutorials that show you how to get information from form fields, specifically from select's. http://www.tizag.com/phpT/forms.php and if you aren't seeing any notices or warnings when you run your code (as you should be seeing), you should add this at the top of the PHP: error_reporting(E_ALL); ini_set("display_errors", -1);
-
as you did with mysql_select_db, user mysql_error() to see if the query works.
-
Need information to stay in fields after page refresh..
BlueSkyIS replied to pappakaka's topic in PHP Coding Help
if you wrap it in a function, $username is only available within the function. i would not wrap it in a function. -
that is actually updating the .htaccess file so that users will be prompted for password. no one will be able to visit the site without providing user name and password.
-
without seeing the entire error, i assume it's on these lines: $fieldID = (int)$_POST['name']; $value = (int)$_POST['value']; and means that neither $_POST['name'] nor $_POST['value'] are defined.
-
you need to echo the return value. echo sec2hms($sec);
-
Need information to stay in fields after page refresh..
BlueSkyIS replied to pappakaka's topic in PHP Coding Help
using example of one of the fields, username, this is what i do: <?php // initialize all form vars to ''. $username = ''; // Handle post, if any if ($_SERVER['REQUEST_METHOD'] == "POST") { // update the values of all form variables $username = isset($_POST['username'])?$_POST['username']:''; // form submission code here, etc. } // Make values safe to display in HTML, after using stripslashes() IF NECESSARY $username = htmlspecialchars($username, ENT_QUOTES); // LATER, in the HTML form, set the value <input type='text' name='username' value='<?php echo $username; ?>'> -
Problem building menu from mysql and do-while
BlueSkyIS replied to andresfz87's topic in PHP Coding Help
in your code all do loops should be while loops while ($row_subsections = mysql_fetch_assoc($subsections)) { // do something with $row_subsections } otherwise, $row_subsections is not set to anything the first time through. i thought it odd, which is why i guessed dreamweaver did it. i leave dreamweaver as soon as design is finished. -
i don't see where $_SESSION['userpass'] is ever set in login.php, therefore it is not set in any other pages.
-
Using include () within the <head> tags
BlueSkyIS replied to MortimerJazz's topic in PHP Coding Help
you can use PHP anywhere you would use HTML. so there is no problem using php in the <head> -
error on line 26 due to failure to execute SQL a couple lines before. follow the same process: add or die(mysql_error()); $sql = mysql_query("SELECT * FROM forum_posts WHERE type='a' AND section_id='$sid' ORDER BY date_time DESC LIMIT 25") or die(mysql_error());