Jump to content

kalivos

Members
  • Posts

    88
  • Joined

  • Last visited

    Never

Everything posted by kalivos

  1. If this is for your site, I would recommend using another signup script all together. The new script would only parse out your text file and not accept any user input. It could parse out 1 line at a time and send that data to the database. Here's an example... <? $file = file('fake_logins.dat'); //connect to db here foreach ($file as $line_num => $line) { $data = explode(":", $line); //do a db insert here } ?> This assumes a delimiter of ':' Hope it helps, -Kalivos
  2. I'm having a problem getting IE to work with me :( I'm creating a dropdown navagation bar for my site (which works ok in FF). IE makes my boxes smaller and puts my popup in another location than where I wanted. *URL removed because it is no longer needed* If anyone can pass along some advice, I would GREATLY appreciate it! Also, if you have any advice on anything else related to the site, I have open ears :) Thanks in advance, -Kalivos EDIT: This was solved by adding a doctype and IE comment conditionals (<!--[if lt IE 8]>).
  3. FYI: change [code]$patterns[1] = '/.MP3/';[/code] to [code]$patterns[2] = '/.MP3/';[/code] in play.php
  4. I changed the cell "character" into char_name. **POOF** it works. Guess I was a little more tired that what I originally thought :) Thanks for the help.
  5. I think you need to use eval() in order to parse vars pulled from a database. Be careful when using that function though!
  6. I'm having a problem inserting some data into a database. I'm getting tired and could use an extra set of eyes. PHP [code] require_once("connect.php"); //db connection script $data = "INSERT INTO personal_data (fname, lname, email, character, sex, bday) VALUES ('$fname', '$lname', '$email', '$cname', '$sex', '$bdate')"; echo $data; mysql_query($data) or die(mysql_error());[/code] Returned [code]INSERT INTO personal_data (fname, lname, email, character, sex, bday) VALUES ('Tim', 'Withers', '********@gmail.com', 'numair', 'male', '199433') You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'character, sex, bday) VALUES ('Tim', 'Withers', '********@gma[/code] Database table personal_data: fname lname email character sex bday Anyone see anything?
  7. You might be interested into learning how CSV works  ;) http://forums.dreamincode.net/showtopic10131.htm
  8. PHP 4 version $dir = "/dir"; $dh  = opendir($dir); while (false !== ($filename = readdir($dh))) {   $files[] = $filename; } print_r($files);
  9. Without a page refresh, you need javascript.
  10. That took me awhile to find :) $currentapptime=$row_appointments['Time'] should be two "=="
  11. $dir    = '/dir'; //folder to scan $files = scandir($dir); //scans the folder $count_of_files = count($files) - 2; // - 2 to account for "." and ".." *edit* This is for PHP5. What version are you running?
  12. Can I assume that $appseconds is defined?
  13. After outputing the data and realizing that it WAS working correctly, I looked at the rest of my code. I was useing "-" as a seperator and thus exploding() to find my data :-/ Thanks for the help
  14. echo $sql; Let us see what your SQL query is after vars have been passed.
  15. Try this $mysqlinsert = "UPDATE `stocks` SET `code` = '$stockname' , `name` = '".$array[0]."' , `owned` = '$numstocks' , `buy_price` = '$inprice' , `timestamp` = '$currtime' WHERE `key` = '$uniqueid'";
  16. [code]$conn->query("SELECT * FROM ads WHERE type='$type' AND start < '$start_date' AND (end > '$end_date' OR end = '')"); while($my_row=$conn->get_row()){ $this->id[] = stripslashes($my_row['ID']); $this->link[] = stripslashes($my_row['out_id']); $this->alt[] = stripslashes($my_row['alt']); $this->img[] = stripslashes($my_row['img']); $this->title[] = stripslashes($my_row['title']); }[/code] I then display the arrays with a loop.
  17. I have a column in my database named "alt" defined as "text". When I perform a SELECT query from that row, it pulls until a "-" is found. It displays random segments from that pull. Example data in db: ...through the Sierra Nevada Mountains-what happened at this year's race? Data displayed:what happened at this year's race? I know that ' or " can cause wierd things like this to happen, but - ? Anyone seen this before?
  18. That's exactly what Barand answered... create file called table_status.php, put this in it: [code]<?php //set these vars $mysql_user = "your mysql username"; $mysql_password = "your mysql password"; $database_name = "dbName"; $tableName = "tableName"; $link = mysql_connect('localhost', $mysql_user, $mysql_password); if (!$link) {   die('Could not connect: ' . mysql_error()); } $res = mysql_query("SHOW TABLE STATUS FROM $database_name LIKE '$tableName'") ; echo date('jS M Y H:i:s', strtotime(mysql_result($res,0,'Update_time'))); mysql_close($link); ?>[/code] Just set the vars.
  19. I use both, depending on which site I refer too  ;D I'm currently making a site with user switchable themes and styles. I'm trying out a new approach of using $_SESSION(). This is my way of trying out different formats. [code]<link href="<? echo $_SESSION['theme']; ?>/css/main.css" rel="stylesheet" type="text/css" />[/code] This way the CSS is constant and user selects the theme. Experiment and have fun  :D
  20. Although it is possible someone is messing with the database, I doubt that is the case. My reasoning is that it happens almost immediately after updating the text, right? If you can port this to a sandbox machine, that would verify if someone is messing you up or somethings buggy in the code. More than likely, it's some part of the code.
  21. This just hit me... Try the following: [code]     $to = $email_address;     $subject = 'Your Membership at Settle The Score!';     $message = "Dear ".$first_name." ".$last_name.",     You are now registered at our website, http://www.stsclan.com!         To activate your membership, please login here: http://www.stsclan.com/login.php          Once you activate your membership, you will be able to login with the following information:     <b>Username:</b> <font color=\"#FF0000\">".$username."</font>     <b>Password:</b> <font color=\"#FF0000\">".$password."</font>     Please keep this username and password in a location that is easily accessible by you.         Thanks!     WebMaster         This is an automated response, please do not reply!";           $headers = "From: leader@stsclan.com\r\n           MIME-Version: 1.0\r\n           Content-Type: text/html; charset=utf-8\r\n           Content-Transfer-Encoding: 8bit\r\n\r\n";     mail($to, $subject, $message, $headers)or die('something went wrong');[/code]
  22. Do you include edit.php on any of the pages? If you do, you might check that you are not using $_GET['done'] on that page. This sounds like it's a simple problem, but could be hard to pinpoint.
  23. I'm not sure what you have tried/done. Have you tried the second version? Does it work? You said "he" was able to send mail via PHP before, why not use the same script? Or is it the same script and did it just stop working? I'm affraid I can't be of much help without some info.
  24. Why did you change the headers? Try this and see if this fixes your problem: [code]       $headers = "From: leader@stsclan.com\r\n" .       'X-Mailer: PHP/' . phpversion() . "\r\n" .       "MIME-Version: 1.0\r\n" .       "Content-Type: text/html; charset=utf-8\r\n" .       "Content-Transfer-Encoding: 8bit\r\n\r\n"; [/code]
×
×
  • 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.