Jump to content

ahvceo

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ahvceo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi All, Sorry I haven't been back sooner but I got tied up. Seems i just cannot fet as much done in a day as I used to and I haven't learned that yet. Anyhow, I cannot get the text in the input box to be red no matter what I do, but in the process of trying I learned that I don't want to do that anyway because then the error message can get in the system as a user name. Take a lot od work to get around that so I have just put an error message at the top of the screen and everything works fine now, Thanks for all your time and suggestions. They were a big help to me, ahvceo
  2. Thank you Andy-H, That is exactly what I was looking for. I would never have guessed the name. Thabks Again, ahvceo
  3. Hi All, I know you have all seen and used them, the little boxes with machine unreadable text you need to fill in in order to login on some sites. I would like to add one to my site but I don't know where to get one of even what they are called so I can search for one. Does anyone know what those little boxes are called? Or where I can get one? Thanks ahvceo
  4. Hi Guys, I have tried everything you suggested without success. I am pretty sure I need to do something at the html level where the inputbox is being displayed. I thought the following code would work but I cannot get the syntax straight. The server keeps puking on the first "echo" line. Can someone help me out here? Thanks ahvceo <tr> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">Choose Password: *</font></b></td> <td><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <? if ($errorMsg == AFF_SI_USEREXISTS) echo "<input type="text" name="ausername" maxlength="12" size=30 background-color=#FA1B00 value="<?=$_POST['ausername']?>"; else echo "<input type="text" name="ausername" maxlength="12" size=30 value="<?=$_POST['ausername']?>"; ?> </font></b></td> </tr> [/cvode]
  5. Hi All, Thanks for the help! I am really getting too old for this stuff. What I used to do in 5 minutes now takes me an hour or two. I was really starting to get frustrated but finally got there. Your code works and now so does mine. Thank you all! ahvceo
  6. Hi All, 20 years ago I thought I knew how to do a query but I guess I have forgotten. I am trying to update a single value in one row in one table in a database with 5 tables. I thought the following code would work but no joy. $payment = "3.50"; $ref = $_COOKIE['ref']; mysql_connect($server, $db_user, $db_pass) or die ("Database CONNECT Error (line "); $monthlydue = mysql_db_query($database, "select monthlydue from affiliates where memid=" . $ref); $monthlydue = $monthlydue + $payment mysql_db_query($database, "INSERT INTO affiliates (monthlydue) VALUES ('".$monthlydue."') where memid =" . $ref) or die(mysql_error()); Thyere are no errors in the database values or names because I use the same values and names to add rows with no problem. If it makes any difference the value I am trying to return is a double but I have the same problem with a string when I try to access just the email address. Can anyone tell me what I am doing wrong? Thanks ahvceo PS Would you believe I have looked a over 20 examples of this on the net and not a single one of them addressed the issue of accessing only one value in a table. Every one showed how to return or insert or add or update a complete row, but not one showed how to get or insert a single value in a row.
  7. Hi Guys, I tried your code and the results are attached in a screen shot. As you can see part of the code is placed in the input box and the rest of it after the input box. I think what needs to be done is address the attributes of the input box which this code does not do. I haven't the foggiest idea od how to do that. Thanks ahvceo [attachment deleted by admin]
  8. Hi All, I have a form on a php page and when the user name is aready in use I send a message to the User Name input box. I would like to be able to indicate the message is an error by coloring it red, or better yet changing the background color of the input box. I have searched the web for several hours but I can not find anything that works if(mysql_num_rows($chk_user) > 0) { $errorMsg .= AFF_SI_USEREXISTS.'<br>'; $_POST['ausername'] = 'Name Already Taken, Try Another'; } The "ausernane" refers to the input box where the error message is displayed. Can anyone tell me how to make something appear in red to show that an error message is being displayed? Thanks ahvceo
  9. Thanks All, I have the problem in habd now thanks to your help. ahvceo
  10. Hi Wayne, Yjanks for the information. How about the first part of my question? Is there any difference between the statements of does it just write yhe same cookie 54 times? Thabks again ahvceo
  11. Thanks Starphp for the information. I am from the old school and started programming in 1962 so I like to see errors output to a file. How do I log the errors other than fopen, fwrite and fclose? Thabks again ahvceo
  12. Hi Again All, When I run my php script, a screen flashes with error messages on it but then in covered be the http screen. Is there any way I can make the server "pause" or "stop" so I can see these error messages? Thanks ahvceo
  13. Hi All, I am 72 and just trying to learn php, it wasn't around when I was programming 20 years ago. I got this code off of the web and I don't quite understand what is happening! I do know that the $_GET statement returns the reefer's username from the affiliate link but that is about all. if($_GET['ref']) { if($cookieExpiration != 0) $cookieLifetime = time() + $cookieExpiration*86400; else $cookieLifetime = time() + 3650*86400; SetCookie ("ref",$_GET['ref'], $cookieLifetime, $cookiePath, $cookieDomain); SetCookie ("ref",$_GET['ref'], $cookieLifetime, $cookiePath, $cookieDomain); SetCookie ("ref",$_GET['ref'], $cookieLifetime, $cookiePath, $cookieDomain); SetCookie ("ref",$_GET['ref'], $cookieLifetime, $cookiePath, $cookieDomain); SetCookie ("ref",$_GET['ref'], $cookieLifetime, $cookiePath, $cookieDomain); as you can see there are 4 Set "SetCookie" statements in a row that look identical to me. Is there a difference in what each statement does? In a different php file I want to use the following code... $myFile = 'testFile.txt'; $fh = fopen($myFile, 'a') or die("can't open file"); $ref = $HTTP_COOKIE_VARS["ref"]; while (list (WHAT GOES HERE, AND HERE, AND HERE)=each ($HTTP_COOKIE_VARS)) fwrite($fh, "WHAT GOES HERE"); fclose($fh) to read the cookie I just set with the previous statements and write them out to a file so I can see what is returned. Is "$HTTP_COOKIE_VARS" a good statement? I read some where that it was depreciated and replaced with a new statement. Since I don't know what or how many variables are being returned what goes where I have written "WHAT GOES HERE", AND HERE, AND HERE" in the code above? There were 2 variables in the list or orginally. Thanks ahvceo PS What is wrong with this text editor? I cannot see the bottom of the page after a few lines. Why doesn't someone fix it?
  14. Thank You Dannie10. My problem was that I wasn't saving it as php. It now works fine and I can now try some interesting things ahvceo
  15. Hi Dannie10 Thanks for the quick reply. I tried your changes and I get the following output when I run it. 5) {echo "yes";} else {echo "no";} ?> Here's my code copied from the source... <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Make Table</title> </head> <body> <table> <tr> <?php for($l = 1; $l <=7; $l++): ?> <td align="center"> <?php if($l > 5) {echo "yes";} else {echo "no";} ?> </td> <?php endfor; ?> </tr> </table> </body> </html> Any suggestions? I would really like to be able to embed php to make tables. You could have a bunch of images in a database and display them in a nice grid. Thanks ahvceo
×
×
  • 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.