nuttycoder
Members-
Posts
233 -
Joined
-
Last visited
Never
Everything posted by nuttycoder
-
your welcome glad you got it working.
-
[SOLVED] login-forgot password response using msg box
nuttycoder replied to moneeshot's topic in PHP Coding Help
Sorry not to sure what you mean. -
I find its a really good way of searching I've used it ever since I came across it.
-
My bad :-X
-
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
-
you can restrict the actual file size or better yet resize their image on upload.
-
your welcome. it took me ages to get it work when i first looked at dates so your not alone :0)
-
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.
-
[SOLVED] login-forgot password response using msg box
nuttycoder replied to moneeshot's topic in PHP Coding Help
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> -
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
-
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\" >"; ?>
-
[SOLVED] login-forgot password response using msg box
nuttycoder replied to moneeshot's topic in PHP Coding Help
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 -
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.
-
yeah I noticed mistakes in my code I've updated it
-
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\" >"; ?>
-
Missing semi's on these lines: or die ("Couldn't connect") echo " <tr>
-
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
-
[SOLVED] javascript and PHP allowed at once?
nuttycoder replied to jeger003's topic in PHP Coding Help
Glad to be of help :-) -
you could store the end result in an array then reverse the array order. http://uk3.php.net/sort
-
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(); ?>
-
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.
-
[SOLVED] phone number validation for "not required" field
nuttycoder replied to carley_bell's topic in PHP Coding Help
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 '); } } ?> -
in that case your best off getting a good php book that starts at from scratch and take it from there.
-
[SOLVED] javascript and PHP allowed at once?
nuttycoder replied to jeger003's topic in PHP Coding Help
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>"; ?> -
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