Jump to content

webent

Members
  • Posts

    255
  • Joined

  • Last visited

    Never

Everything posted by webent

  1. Just curious, did you go into phpmyadmin and check what is actually in the table, make sure everything is kosher, the way it should be, all data accounted for and correct?
  2. As far as the link color not changing, your a color and your a:hover color are the same in your css file... now as far as changing size, are you sure that's it just not because you making it underline the link when it is hovered over?
  3. Have you looked into possibly using CAPTCHA?
  4. Did you check your a:hover {color:#ff0;} code? Was that it?
  5. Not trying to be mean, but I would suggest doing some research here http://www.w3schools.com/css/ for now though, I'll suggest taking a look at your a:hover css code.
  6. Right off the bat, this looks like it wouldn't work... <img src="images/$title.JPG"> try ... <img src="images/<? echo $title; ?>.JPG"> Didn't really look at too much of the other.
  7. Know of any examples of regex (grep/awk/php) I've never heard of it before... not exactly sure what to google for... LOL... regex or grep or awk
  8. The way I've always done that is just using an if statement on the level of the user... i.e. if($_SESSION['level'] == 1) {echo '<a href="theprivatelinks">';} or if($_SESSION['level'] == 2) {echo '<a href="thepubliclinks">';} ... don't know if this helps or not, but dynamic pages shouldn't suffer from caching problems, at least I've never had that problem... Unless that is of course unless the sessions are not being destroyed prior to changes being made...
  9. Try ... mysql_query ("UPDATE clicks SET count = count + 1 WHERE pagename='$pagename'");
  10. perhaps here... newsid = '".$_GET['id']."'"; try this... newsid = '{$_GET['id']}'; Whoops, was looking at wrong block of code... nevermind the stuff above ... Try getting rid of the ... OR die(mysql_error()); $cres = mysql_query($csql) OR die(mysql_error()); and try this instead, see if it gives you any additional info... if (!$cres) { $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . $csql; die($message); }
  11. perhaps "empty" isn't catching it... try ... if(!empty($subject) || if ($subject == "") && !empty($comment) || if ($comment == "")) Try that in the appropriate locations and see if it makes a difference... And I'm not sure about this though ... I think you need an "isset()" or "!isset()" ... if($_SESSION['username']) like ... if(isset($_SESSION['username']))
  12. There was something that stuck out... I've never seen code used like this before... so I'm not completely sure that it is syntaxically correct... But, I could be wrong if($i % 2 == 0) I would think it should look more like ... if(($i / 2) == 0) Oh yeah, and a better way for this ... $i = $i - 1; is this ... $i -= 1;
  13. Works, but now it does not tell them it was successfully submitted to the database, just takes them to the new submit page Right, do this... header ("Location: newad.php?status=success"); Then towards the top of the newad.php page somewhere, add this code... <? if ($_GET['status'] == "success") {echo 'Something was successfully submitted to the database.';} ?>
  14. Since I'm going to have to ultimately end up having to use the AJAX solution, which is a bit complicated... I just made a temporary solution for it, until I can come back to it later... Here is what I've come up with so far... In the function page, I have this... $total_count = 0; $handle = fopen($_POST['file_name'], "r"); while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) { $total_count++; } $total_count -= 1; $count_results = mysql_query("UPDATE insertion_counter SET total_count = '$total_count' WHERE counter_id = '1'"); /////////// End getting total amount of rows in csv file $date_time_stamp = date("Y-m-d h:i:s"); $empty_model_no = 0; $row_counter = 0; $handle = fopen($_POST['file_name'], "r"); while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) { $row_counter++; if ($row_counter == 1) { // First row header removed. } else { $products_inserted_counter = $row_counter - 1; $count_results = mysql_query("UPDATE insertion_counter SET current_count = '$products_inserted_counter' WHERE counter_id = '1'"); Then on the page that is calling the function page, I open a small iframe without borders or scrollbars... <iframe name="COUNTERFRAME" src="import-status.php" width="150" height="50" scrolling="no" frameborder="0"></iframe> Then in the import-status.php page that is being called into the iframe, I use this... <? if ($percent_complete != 100) { echo '<meta http-equiv="refresh" content="15">'; } include_once "connection.php"; $results = mysql_query("SELECT current_count, total_count FROM insertion_counter WHERE counter_id = '1'"); while ($row = mysql_fetch_array($results)) { $current_count = $row[current_count]; $total_count = $row[total_count]; } if ($total_count != 0) { $percent_complete = number_format($current_count / $total_count,2); $percent_complete *= 100; } if ($percent_complete != 0) { echo '<center>Loading in Progress<br>' . $percent_complete . '% complete</center>'; } if ($percent_complete == 100) { $count_results = mysql_query("UPDATE insertion_counter SET current_count = '0', total_count = '0' WHERE counter_id = '1'"); } ?>
  15. Can't you just use something like this upon completion... header ("Location: newad.php");
  16. ok,... got it... <script type="text/javascript"> <!-- function checkForm(form) { var phoneNum = form.phone.value; var phoneNumLength = phoneNum.length; if (phoneNumLength != 11) { alert("The phone number provided is not valid."); form.phone.focus(); changeDiv('phone_label','#ff0000'); return false; } } function changeDiv(the_div,the_change) { var the_style = getStyleObject(the_div); if (the_style != false) { the_style.color = the_change; } } function getStyleObject(objectId) { if (document.getElementById && document.getElementById(objectId)) { return document.getElementById(objectId).style; } else if (document.all && document.all(objectId)) { return document.all(objectId).style; } else { return false; } } // --> </script> <form name="thisForm" action="" method="POST" onSubmit="return checkForm(this)"> <label name="phone_label" id="phone_label" style="color:#000000;">Phone:</label> <input name="phone" type="text" id="phone"> <input type="submit" name="Submit" value="Submit"> </form> Hope you like...
  17. As far as the I use this,... var phoneNum = form.phone_number.value; var phoneNumLength = phoneNum.length; if (phoneNumLength != 11) { alert("The phone number provided is not valid."); form.phone_number.focus(); return false; } I'll check on the other part of your question...
  18. You might have trouble getting inside somebody's face :-\ You could always do like "Jay and Silent Bob Strike Back" and track them down...
  19. I agree with Loldongs, $id doesn't appear to be an array, but you're trying to treat it like one.
  20. Yeah, like he said, check the chown and chmod properties of the created directory... see what they are... maybe that's why it isn't being moved into it...
  21. Or echo the whole thing... <?php echo ' <root> <settings bordercolor="0xFF0000" delay="20" step="10" a="140"/> <images> <img src="' . $siteurl . '"properties/owners"' . $row['username'] . '"images/ws2-b1581-20040201181235-t.jpg" alt="www.frogstyle.ch" width="128" height="96" big_src="' . $siteurl . '"properties/owners"' . $row['username'] . '"images/ws2-b1581-20040201181235-g.jpg" big_width="640" big_height="480"/> <img src="' . $siteurl . '"properties/owners"' . $row['username'] . '"images/ws2-b1570-20040201180406-t.jpg" alt="www.frogstyle.ch" width="128" height="96" big_src="' . $siteurl . '"properties/owners"' . $row['username'] . '"images/ws2-b1570-20040201180406-g.jpg" big_width="640" big_height="480"/> <img src="' . $siteurl . '"properties/owners"' . $row['username'] . '"images/ws2-b1572-20040201180444-t.jpg" alt="www.frogstyle.ch" width="128" height="96" big_src="' . $siteurl . '"properties/owners"' . $row['username'] . '"images/ws2-b1572-20040201180444-g.jpg" big_width="640" big_height="480"/> </images> </root> '; ?>
  22. Hi guys, me again... Come to find out, my product files provided by various suppliers contain duplicate model numbers for completely different products, Go Figure... LOL So I'm having to do some pre-database-loading, file integrity checking... Here's what I got so far... <? function preCheckFile($_POST) { $handle = fopen($_POST['file_name'], "r"); while (($fields = fgetcsv($handle, 0, ",")) !== FALSE) { // Begin check for duplicate model numbers in the csv file $products_model = $fields[$_POST['products_model']]; // End check for duplicate model numbers in the csv file } } ?> So I guess what I'm asking, is there an easy way that I'm just not getting to check if the $products_model is duplicated within the file without having to upload all of them into a temporary table and then re-query them?
  23. Alright, cool, I will try to get together my Zen and make an attempt at it... Just an after thought, hopefully once I install these files and get the configuration right, it will work for any site on the server using the program, kind of like the Smarty that I installed... Like the Smarty though, I will have to remember how to install and do it on each server... ack!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.