-
Posts
72 -
Joined
-
Last visited
Never
Everything posted by High_-_Tek
-
What? That 'C' that you see if a part of the indian's headdress. Not to mention that the indian has been our mascot since the 70's. Thanks all for the other comments though, very helpful!
-
Hello all! My school district has, for the past few years, been having a student develop their website as part of a class at the high school. Last year in September, I took over the website from the previous (now, an alumni) student developer. Over the summer, he was paid to re-design and re-code the website. However, at the end of the summer, he accidentally wiped the webroot, so when I took the job, I had to do the coding more or less from scratch (minus the design, of which he had a backup of) I am looking for UI/usability/functionality criticisms, but please not that this website's development was very rushed as the administration was breathing down my throat to revitalize the destroyed website. http://www.grafton.k12.ma.us Also, I am aware of the menu issues (mis-alignment and the green boxes that appear when you mouse over the tabs disappear too quickly), if anyone has suggestions to fix those, I am all ears. Thank you for any and all comments.
-
Well it looks like you have coded your script for if 'register_globals' is turned on, and its better for you to code your script using the superglobals $_POST or $_GET You could re-code your script as: if (empty($_POST['month']) || empty($_POST[['day']) || empty($_POST['year'])) (Of course replace the $_POST with $_GET if your form uses GET
-
[SOLVED] Parse error in PHPredirect - Cannot figure it out
High_-_Tek replied to rlb1's topic in PHP Coding Help
You need to replace the single quotes on the header() line with double quotes. -
[SOLVED] T_ENCAPSED_AND_WHITESPACE problem
High_-_Tek replied to biggerboy's topic in PHP Coding Help
You either need to change all the 's in your query itself (not counting the two ' that signal the beginning and end of a string) to "s or escape them -
That implies that the query you used is not valid, although it should show up in an mysql_error()
-
Your error is indicitive that you have output before your call to session_start() You COULD use output buffering to fix this, or just put the call to session_start() at the top of your page.
-
Hey All, Some Linux support forums have a feature where, apart from their usual RSS, they have a feed that contains 10-20 of the latest unanswered topics If PHP Freaks were to implement that, it would cut a lot of time for people who look around the PHP Help and other boards looking for topics with 0 replies, they can just look at the feed in their browser. Thanks, Rick
-
Designing a Private Messaging System
High_-_Tek replied to MortimerJazz's topic in Application Design
[b]marky167[/b], no one is going to spend their time to do it for you without pay. Either look at Nuke or phpBB for ideas and create your own or start researching. -
You need to extract the mysql results using mysql_fetch_array or any other of it's cousin functions. [code] <?php // Open database connection include 'dbdata.php'; // Check the number of tickets already sold $result = mysql_query("SELECT id FROM tickets WHERE id = '100'"); $row = mysql_fetch_array($result); // Determine which table to send the data to and include the script if ($row['id'] == '100') { include('tickets_waiting.php'); } else { include('tickets_success.php'); } ?> [/code]
-
Parse error: syntax error, unexpected T_VARIABLE..I need help!
High_-_Tek replied to //nocomment's topic in PHP Coding Help
[code] $fp = fopen ('/user/index.html', 'ab') to $fp = fopen ('/user/index.html', 'ab'); [/code] -
Once you connect to the database in php: [code] <?php mysql_query("CREATE DATABASE `a`") OR DIE ('Could not execute query: ' . mysql_error()); ?> [/code] Or go into phpMyAdmin or the MYSQL Command Line and create it
-
Look into the mod_rewrite if your server uses Apache
-
"SELECT MAX(`message_id') as message_id FROM `TABLENAME`" The MySQL-driven functions are VERY powerful
-
Just recently they have found 'collisions; in the md5 equation that opens up a new door for them to possibly be cracked (it is still no easy task). SHA-1 I do not know about, but consider doubling your encryption.
-
Are you sure that the database 'a' exists?
-
Correct me if Im wrong but shouldnt $db = new sql_db(localhost, root, zoindok, cesite, false); be $db = new sql_db('localhost', 'root', 'zoindok', 'cesite', false); Unless the first 4 are constants
-
redirecting page without using HEADER(), is there another way?
High_-_Tek replied to bilis_money's topic in PHP Coding Help
Try using output buffering before your call to header() (ob_start(), etc) You can use JS Redirects (non-reliant) and META redirects (same) -
Well... couldnt you just do something in the order of this: <?php session_start(); $data = $_SESSION['bubba']; mail(__TO__, __SUBJECT__, $data); ?> Replace to and subject with the to email and subejct, respeictivly
-
No, And you could re-write your replacement func like so.. [code] function replace($array) { foreach ($array as $ref => $value) { $somevar = preg_replace("#\{".$ref."\}#i", $value, $somevar); } } [/code] The array structure is like so: var ref in html file => real value And the $somevar is the code retrieved using file_get_contents()
-
No, buisnessman in saying that you want to assign the query to a variable, and then set that variable as the mysql_query string as so: [code] $q = "SELECT * FROM table"; $result = mysql_query($q); [/code]
-
Deleting a row from the database. *SOLVED*
High_-_Tek replied to pocobueno1388's topic in PHP Coding Help
if ($_POST['delete']){ mysql_query("DELETE * FROM message WHERE messageID='$delete'"); } to if ($_POST['delete']){ mysql_query("DELETE * FROM message WHERE messageID='".$_POST['delete']."'); } -
Only files included or required will be parsed as PHP, not fopen or file_get_contents and as I said before, you cannot perform any operation on the include statement, but you can do whatever the hell you want with the stuff that is returned from the included file
-
Please point out any holes in my function but this is a simple version of what i've been using lately: <?php function parse_BBCode($input_str) { preg_match("#\[b\](.*?)\[b\]#i", $input_str, $matches); $input_str = preg_replace("#\[b\](.*?)\[\\b\]#i", "<b>".$matches[1]."</b>", $input_str); ... more BBCode->HTML regexs return $input_str; } ?>
-
Add an 'OR DIE ('Could not Execute Query Because: '.mysql_error()); to the end of your mysql_query statement