Jump to content

systemick

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.systemick-web-development.co.uk

Profile Information

  • Gender
    Not Telling

systemick's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This would work: if($result=file_get_contents("http://www.example.com")) { // handle good case } else { // treat error }
  2. HuggieBear is right. You need to do some work for yourself. I suggest you start with the PHP functions strpos and strstr
  3. Your query should be something like this $query = "select * from people where [column] = \"%$trimmed%\" order by firstName" Replace column with the name of the column you are searching on.
  4. You can treat a string as an array in php. Try this $word = 'superman'; print 'first letter = '.$word[0];
  5. You would need to pull the word out of the database then test it for the letters. If you had asked for letters 1,3&4 you would do somehting like this if ($secret_word[0] == 's' && $secret_word[2] == 'p' && $secret_word[3] == 'e') { <Do something> }
  6. Try something like this $new_test = array(); foreach($test as $key=>$value) { if (strpos($value, 'test') !== FALSE) { $new_test[$key] = str_replace($value, 'hello', 'test'); } else { $new_test[$key] = $value; } }
  7. Put a closing </option> tag after 'Please Select A Security Question' and remove the last </option> tag and see if that works
  8. What I always do with SQL is print it out in the browser then paste it into my mysql client. I use a shell but i believe you can do this with PHPMyAdmin too. Doing this usually gives an error message which can then be used to diagnose the problem.
  9. You would then need to use the stripslashes function to remove them: http://www.php.net/manual/en/function.stripslashes.php
  10. $result = mysql_query("SELECT MAX(idnum) as id from ready_aclassft"); $row = mysql_fetch_row ($result ); echo $row['id'];
  11. I'm not clear what you are trying to do here. Are you trying to send a file to a remote server or simply to write a file onto the file system on which your web server is located? ?I'm not clear why you need to use an editor to write this file?
  12. The mysql_real_escape_string function will prevent sql injection. The only other thing I would add is that you don't need the first 2 lines of code. You could just write $check = mysql_query("SELECT email FROM users WHERE email = '".mysql_real_escape_string($_POST['mail'])."'")
  13. Being a fan of Drupal I always use Drupal & Ubercart. Drupal has a bit of a steep learning curve but once you get into it its a great app
  14. When you say you want to validate the html, what do you mean exactly?
  15. You don't say if the timestamps are unix timestamps. If they are and you wanted the number between 6AM and 12PM today the sql would be: "select count(*) from event where event_time >= unix_timestamp('2010-08-06 06:00:00') and event time <= unix_timestamp('2010-08-06 12:00:00')
×
×
  • 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.