Jump to content

nuttycoder

Members
  • Posts

    233
  • Joined

  • Last visited

    Never

Everything posted by nuttycoder

  1. your welcome glad you got it working.
  2. I find its a really good way of searching I've used it ever since I came across it.
  3. an example from php.net <?php switch ($i) { case 0: echo "i equals 0"; case 1: echo "i equals 1"; case 2: echo "i equals 2"; } ?> http://uk2.php.net/switch I don't think you need a switch in your case as each value has only one outcome. Also searching using like is not all that accurate a better way is using match this may be useful if you ever want to go down that route : http://www.newmedia.lincoln.ac.uk/dcarr/tutorials/php/searching-with-php-and-mysql-beyond-like
  4. you can restrict the actual file size or better yet resize their image on upload.
  5. your welcome. it took me ages to get it work when i first looked at dates so your not alone :0)
  6. if the image source is http://72.38.175.121/photo/Steven then you won't see anything on screen only in your source code. It is strange how your getting no space between the username and width though.
  7. you can place php inside javascript easily its hard the other way round. <script type="text/javascript"> alert("Your password is <?php echo $row->password;?>"); </script>
  8. You can format the date using strtotime: <?php echo "<td>".date('l F d, Y',strtotime($row['start']))."</td>\n"; echo "<td>".date('l F d, Y',strtotime($row['start']))."</td>\n"; ?> outputs like: Monday January 19, 2009
  9. What do you get if you use: <?php echo "<img src=\"http://72.38.175.121/photo/".$req_user_info['username']." width=\"150\" height=\"150\" >"; ?>
  10. you could put the password inside a JavaScript alert this will cause a popup with the password and an ok button see a demo at http://www.tizag.com/javascriptT/javascriptalert.php
  11. I've just ran this code $name = 'dave'; echo "<img src=\"http://72.38.175.121/photo/{$name}\" width=\"150\" height=\"150\" >"; Outputs <img src="http://72.38.175.121/photo/dave" width="150" height="150" > won't show in the page as there is no image there.
  12. yeah I noticed mistakes in my code I've updated it
  13. use backslashes on all double quotes that are inside double qoutes <?php echo "<img src=\"http://72.38.175.121/photo/".$req_user_info['username']." width=\"150\" height=\"150\" >"; ?> you can put brackets in double quotes as well just put them inside {} <?php echo "<img src=\"http://72.38.175.121/photo/{$req_user_info['username']}\" width=\"150\" height=\"150\" >"; ?>
  14. Missing semi's on these lines: or die ("Couldn't connect") echo " <tr>
  15. You would need to use a database or use flat files if you want to use database (which is a better option) the first thing you would need is a database then to know how to connect to it I have some basic tutorials the first one starts with connecting to a database have a look may be useful http://www.newmedia.lincoln.ac.uk/dcarr/tutorials/php/p-6
  16. you could store the end result in an array then reverse the array order. http://uk3.php.net/sort
  17. When using sessions each file will need session_start at the very beginning of the file or the session can not be read. <?php session_start(); ?>
  18. not a simple task as word press is all object orientated the coded needed could be in any number of files your best best is to ask on the word press forum or see is there is a plugin to modify your theme.
  19. oops my bad <?php if (isset($_POST['field_6'])) { if(!preg_match('/^.?[0-9]{3}.?.?[0-9]{3}.?[0-9]{4}$/i', $_POST['field_6'])) { die('Invalid phone number. Please use your browsers back button to go back to the form '); } } ?>
  20. in that case your best off getting a good php book that starts at from scratch and take it from there.
  21. you can escape double quotes with a backslash <?php echo "<div align='left' class='FontColorsData'><span class='Public_Private_EmailFont'>Public Email:</span><A HREF=\"javascript:void(0)\"onclick=\"window.open('http://www.clone003.site40.net/Email_Request/form.html','linkname','height=400, width=450,scrollbars=no')\"> Request an email NOW!</a></div>"; ?>
  22. If you want to create a login/logout system here's a good tutorial for it http://www.newmedia.lincoln.ac.uk/dcarr/tutorials/php/login-script-with-validation
×
×
  • 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.