Jump to content

DrTrans

Members
  • Posts

    179
  • Joined

  • Last visited

Everything posted by DrTrans

  1. if($screenstatus == "Declined") { print"<br> Screening: <font color=\"red\">$screenstatus</font></b>&nbsp&nbsp&nbsp<input type=\"submit\" name=\"approve\" value=\"Approve\"><hr>\n"; On Button click i want it to alert " Are you sure you want to approve," if you click yes it connects to the database and changes the field from 0 to 1. can this be done easily?
  2. Does anyone have a basic file upload script.. im trying to figure out how to code it.. and im completly lost. I know that i need to setup a form.. and i need to store the filename in a database. so I can call the files later. Any general help on how to parse the upload would be great. Thanks
  3. $ownerfname = strtolower($row['First']); now for example $ownerfname = "john" i only need the "j" can u please help. this has got to be simple.. i tried split(); but didnt work. then i need it to join so it makes $firstinital and $ownerlname = $newvariable = jsmith
  4. Heres my Code: $query2 = "SELECT COUNT(*) FROM property WHERE Owner_ID = '$ownerid'"; $result2 = mysql_query($query2); if ($row2 = mysql_fetch_array($result2)) print"<b>Total Properties Owned:</b> ".$row2[0]; This right now displays Total Properties Owned: 3 now below it, how would i do a multiple select textarea box that shoes each property name. the column in the mysql database in the property table is "PropertyName" This has stumped me.. Thanks for your help.
  5. Thanks man, I completely didnt even notice the = was missing either.. Im sitting here like WTF Thanks ..
  6. in responce to kick: Fatal error: Function name must be a string
  7. Neither of these solutions have worked
  8. That gives a value of "1" but i know in the database there are 7 records.
  9. $query2 = "COUNT * FROM property WHERE Owner_ID = '$ownerid'"; $result2 = mysql_query($query2); print"<b>Amount of Properties Owned:</b> $result2"; Basically i want it to count how many times it finds that match and display a number.
  10. You can use a WMA player plugin using javascript.
  11. $applicantdate = 2008-07-18 00:00:00 <-- example Thanks
  12. I need some help .. Basically i only want it to get records dated within the last 30 days $query = "SELECT * FROM applicant ORDER BY AppliedDate DESC"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $applicantid = $row['Applicant_ID']; $applicantdate = $row['AppliedDate']; list($adate,$time) = split( " ", $applicantdate, 2 ); $applicantfname = $row['FirstName']; $applicantlname = $row['LastName']; print"<option value=\"$applicantid\">$applicantlname, $applicantfname [ $adate ]</option>"; } [code] This im sure is a simple fix. Thanks
  13. instead of using <meta > tags use header();
  14. For your answer based on md5(); md5 is encryption that randomizes a key based on supplied information ... md5 does not see the .extension as an extension. MD5 see's it as a string. for example $variable = md5($password); if you have variable = md5("picture.jpg"); its going to put picture.jpg out as just a constant string. That is the reason md5 does not work for this type of scenario. http://us2.php.net/md5 <-- more information on MD5
  15. (( Deleted because I the poster was an idiot )) read below.
  16. Can you give us more code.. please. possible where sprintf() is called.
  17. Just in case others are wondering i fixed this problem by doing this $query = "SELECT * FROM tester WHERE active = "$active" ORDER BY tester ASC"; Thanks Dr Trans
  18. I goofed myself Would this be sufficent: $query = "SELECT * FROM tester where Active = '$active ' SORT BY tester ASC";
  19. I need some help with figuring out sorting $connect = ('localhost','root',''); mysql_select_db("tester"); $query = "SELECT * FROM tester"; $result = mysql_connect($query); while($row=mysql_fetch_array($result)) { $id = $row['id']; $prop = $row['propertyname']; echo "$prop -- $id "; } Now i want it to sort it A to Z by first letter of $prop. Thanks DrTrans
  20. my variable : $variable = "27-5274594" How do i pull the last 4 digits of the $variable without setting $variable = "4594"; in example: $variable = $row['TaxID']; << Where variable would be transformed to only the last 4 digits >> print "$variable";
  21. if($_SESSION['uid']){ $userid = $_SESSION['uid']; $query = "SELECT username FROM users WHERE userid = '$userid'"; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result) { $username = $row['userid']; $email = $row['email']; echo "Welcome. \n"; echo "$username and $email"; } }else{
  22. I cant get this to send me an email for nothing... Im running windows 2003 with xampp. if($submit){ ini_set("sendmail_from", "info@mydomain.com"); $sendmail = mail('$mainemail', 'Requested Service', '$property'); echo "<BR/>mail() returned: " . ($sendmail? "TRUE" : "FALSE") . "<BR/>"; var_dump($sendmail); echo "$property -- $service --- $extra -- $pay --$mainemail"; } When this script runs.. this is what it produces: mail() returned: TRUE bool(true) Catherine Sim 1716 -- Tester --- -- Rent --js@sparkyoursite.com Any help is appreciated
  23. Thanks, I appreciate it. I see what i was doing wrong.
  24. Basically what im doing is.. Checking Form submission to see if the groupname & groupuser already exist in db, If it doesnt exist, add it. if ($submit) { if($groupname) { $connect = mysql_connect("localhost","damgears_blaster","blaster1"); mysql_select_db("damgears_blaster"); $chkdb = mysql_query("SELECT * FROM groups"); while($row = mysql_fetch_assoc($chkdb)) { $dbgroupid = $row['groupid']; $dbgroupname = $row['groupname']; $dbgroupuser = $row['user']; if ($groupname==$dbgroupname&&$dbusername==$dbgroupuser) { echo "Group Already Exit"; } else $queryreg = mysql_query("INSERT INTO groups VALUES ('','$groupname','$dbusername')"); die ("Added Group $groupname! $dbusername"); } } else echo "Please fill in all field"; } } else die ("You are not logged in!!! Please login to continue"); Im sure its something very simple Thanks
×
×
  • 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.