")
- $query .= "('" . htmlspecialchars($user) . "',";
- # only protect PHP-code start tags.
- $query .= "'" . ereg_replace("<\\?", "<?", $note) . "',";
- # or we could protect all HTML
- #$query .= "'" . htmlspecialchars(nl2br($note)) . "',";
- $query .= "'" . $sect . "',";
- $query .= "'" . $now . "',";
- $query .= "'" . $lang . "')";
- //echo "\n";
- if (mysql_query($query)):?>
+if (isset($note) && isset($action) && strtolower($action) != "preview"):
+ $now = date("Y-m-d H:i:s");
+ $query = "INSERT INTO note (user, note, sect, ts, lang) VALUES ";
+ # no need to call htmlspecialchars() -- we handle it on output
+ $query .= "('$user','$note','$sect','$now','$lang')";
+ //echo "\n";
+ if (mysql_query($query)):?>
Your submission was successful -- thanks for contributing!
- $new_id = mysql_insert_id();
- $msg = stripslashes($note);
- $msg .= "\n\n $redirect \n";
- mail("php-notes@lists.php.net","note $new_id added to $sect",$msg,"From: $user");
- else:
- // mail it.
- mail($mailto, "failed manual note query", $query);
+ $new_id = mysql_insert_id();
+ $msg = stripslashes($note);
+ $msg .= "\n\n $redirect \n";
+ mail("php-notes@lists.php.net","note $new_id added to $sect",$msg,"From: $user");
+ else:
+ // mail it.
+ mail($mailto, "failed manual note query", $query);
?>
There was an error processing your submission. It has been automatically
e-mailed to the developers.
- endif;?>
+ endif;?>
You can go back from whence you came,
or you can browse the manual with the
on-line notes.
- else:?>
-
+
+
This is what your entry will look like, roughly:
+
+ echo '';
+ makeEntry(time(),stripslashes($user),stripslashes($note));
+ echo "
";
+ else:?>
You can contribute to the PHP manual from the comfort of your browser!
-Just add your comment in the big field below (and your email address in the
-little one).
+Just add your comment in the big field below, and, optionally, your email
+address in the little one (usual anti-spam practices are OK, e.g.
+johnNOSPAM@doe.NO_SPAM.com).
-Note that HTML tags are not allowed in the posts. We tried allowing them
-in the past, but people invariably made a mess of things making the manual
-hard to read for everybody.
+
Note that most HTML tags are not allowed in the posts. We tried
+allowing them in the past, but people invariably made a mess of
+things making the manual hard to read for everybody. You can include
+<p>, </p>, and <br> tags.
-Note: If you are trying to report a bug, you're in the wrong place.
-If you are just commenting on the fact that something is not documented,
-save your breath. This is where you add to the documentation, not
-where you ask us to add the documentation. This is also not the
-correct place to ask questions. The notes
-are being edited and support questions are being deleted from them,
-so if you post a question, it will be removed. (But once you get an
-answer, feel free to come back and add it here!)
-
-Click here to go to the support pages.
-Click here to submit a bug report.
-Click here to request a feature.
+
Read carefully the following note. If your post falls into one of the
+categories mentioned there, it will be rejected by one of the editors.
-
+Note: If you are trying to report a
+bug, or request a new fature or language
+change you're in the wrong place. If you are just commenting on the fact
+that something is not documented, save your breath. This is where you
+add to the documentation, not where you ask us to add the
+documentation. This is also not the correct place to ask questions (even if you see others have done that
+before, we are editing the notes slowly but surely). If you post a note in
+any of the categories above, it will edited and/or removed.
+
+
+Just to make the point once more. The notes are being edited and support
+questions/bug reports/feature request/comments on lack of documentation, are
+being deleted from them (and you may get a rejection email), so
+if you post a question/bug/feature/complain, it will be removed. (But once you
+get an answer/bug solution/function documentation, feel free to come back
+and add it here!)
+
+Click here to go to the support pages.
+Click here to submit a bug report.
+Click here to request a feature.
+
+ endif;
+ if (!isset($sect)):?>
To add a note, you must click on the 'Add Note' button
-on the bottom of a manual page so we know where to add the note!
-
-