Jump to content

user4fun

Members
  • Posts

    573
  • Joined

  • Last visited

Everything posted by user4fun

  1. user4fun

    Loop

    I have a form5 textfieldsusername //submitted only once it is the samethen 4 textfieldstxt1txt2txt3txt4after the user submits the infromationit insert the information in a tableproblemsright now $link = mysql_connect("", "", "") or die ("No connection"); mysql_select_db(" ") or die ("no database"); $sql = "INSERT INTO submit_entry (entry_id, username, txt, condition) VALUES (' ', '$username', '$txt1', 'contacted')"; $query=mysql_query($sql);if($query){ echo " ";}else{ echo "<b>ERROR</b>";}$sql = "INSERT INTO submit_entry (entry_id, username, txt, condition) VALUES (' ', '$username', '$txt2', 'contacted')"; $query=mysql_query($sql);if($query){ echo " ";}else{ echo "<b>ERROR</b>";} and so on for 4 timesnotice the '$txt' is the only one that changescan i put that in a loop?or is the code ok as is.problem 2how can i make it recognize that the txt2 is empty and it should stop and not bother process the next fields txt3 and txt4incase the user only inserted txt1
  2. user4fun

    Php MyAdmin

    hmmmmmmgood suggestions but it still does not workRegardless of what $Domain is which becomes properly changed to $strdomainThe system always recognize it as a domain that already exsists.No matter what the entry is.
  3. user4fun

    Php MyAdmin

    That did not do it eitheri think itis a syntax problemhere is the original code again $strdomain = strtolower($Domain); //$Domain, user input from form$q2 = mysql_query("SELECT * FROM `Profile` WHERE `Domain` = $strdomain); $q3 = mysql_fetch_object($q2); if($q3->Domain == $strdomain) { die('<BR>This domain name entered as "'.$q3->Domain.'" is already in our system.');}
  4. user4fun

    Php MyAdmin

    include("/inc/business_main_header.inc");$strdomain = strtolower($Domain);//Checks to see if domain already exsists$link = mysql_connect("mysql", "", "") or die ("No connection"); mysql_select_db("Business") or die ("no database"); $q2 = mysql_query("SELECT * FROM Profile WHERE Domain == $strdomain"); $q3 = mysql_fetch_object($q2); if($q3->Domain == $strdomain) { die('<BR>This domain name entered as "'.$q3->Domain.'" is already in our system.');} no matter what the $domain is, it says it is in the system :-(
  5. user4fun

    include

    I appreaciate all the good infoi found out that theerror was in my include file itselflolsorry, but hey, i learned something anywaysTHANK YOU
  6. user4fun

    if statment

    is this if ($MyNum == Y_BUS){echo " OKAY";include (" ");} any diffrent from if ($MyNum ==y_BuS){echo "Okay";include (" ");} I want to figure out if the user input is case sensitive and does theif statment condition have to be an exact match to the user input.
  7. user4fun

    include

    what is the difference betweeninclude 'info_send.php';andinclude ("info_send.php");andinclude "info_send.php";the reason why i ask is that because none of them work for me?lolwhy am i using this1. form, user inputs emailscript, validates email, the right chracters and allif correctecho "good";include yada yada yada ( a file that send email sayig thank you"elsedie
  8. It worked but the image shrunk alot??
  9. <table border="1" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="75%" id="AutoNumber3" bordercolorlight="#C0C0C0" bordercolordark="#808080" background="../images/eagle.jpg" height="98"> the eagle picture becomes repetitive, how can i stop that and just centralize it to the table.?Thank you
  10. user4fun

    error

    <? $link = mysql_connect(" ", " ", " ") or die ("No connection"); mysql_select_db(" ") or die ("no database"); //so far it works$get_user = mysql_query("SELECT * FROM `table1` WHERE username = $_POST["username"] AND user_password = $_POST["user_password"]");$q = mysql_fetch_object($get_user); if{(!$q) die("Login Failure: An error occured, please verify your username and password are correct.");}else{echo "hello world";} I am going to want to replace the hello world with lastname, firstname columns from the table 'table1'i am not sure what is wrong
  11. THIS IS ABNORMALI tried to run each one seperatly and they all work except the '\'this vharacter that i am trying to make invalid does not work for me, i am guessing because it is a sign used in some kind off advance php code above my knowledgeany ideas how to fix this
  12. When i change the $junkFROM $junk = array('.' , ',' , '/' , '\' , '`' , ';' , '[' , ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '='); TO $junk = array(''*', '&'); everything works fine but i still need to add all the other junk stufflol
  13. Can someone tell mewhatis wrongwith this thingthank you $junk = array('.' , ',' , '/' , '\' , '`' , ';' , '[' , ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '='); //starting lenght of username $len = strlen($_POST['username']); //replace invalid characters $_POST['username'] = str_replace($junk, ' ', $_POST['username']); $test = $_POST['username']; //if lenghts are different ($len smaller), invalid characters found, so prompt error. if(strlen($test) != $len) { die('Username Error: Username contained invalid characters. You can only use A-Z, 0-9 and the underscore (_).'); }
  14. <?php$to = "$family";$subject = " THIS IS THE PART I NEED HELP WITH";$message = "<html><head><title>.</title></head><body><center><h2>A family member <br>more headings</h2></center><table align='center' border='0' cellspacing='1' cellpadding='0' style='border: 1px solid #000000;'><tr><td align='left' width='100%'><table width='100%'><tr><td width='100%' valign='top'><table width='100%' style='border: 1px solid #000000;' bgcolor='#E4E4E4'><tr><td valign='top' align='center'>This message was sent to you by **Need help with this one also**ETC ETC ETC </td></tr></table></td></tr></table></td></tr></table></body></html>";$header = "Content-type: text/html;charset=iso-8859-1";mail ($to, $subject, $message,$header);?> In the top of the code under $subjecti need it to sayYour $relation $namethese two variable are user input form a previouse formthe same thing in the message, when the message starts it says this message was send to you byyour $relation $namethen it goes on with the regular messagehow can i do that??i would appreciate any help.
  15. my hosting company is yahoo and yes i can use php,the questions is where to download the mail script to???? certainly not in my computer, would i have to tooit into my website files?
  16. <code><form name="form1" action="mailto:me@mysite.com" enctype="text/plain" method="POST"> i jsut starting using this, butit the user does not ahve a profile setup with the enternet explorer it will not work, also it will give the user a warning message that their email information will be sent along with the email. I am assuming alot of users will hit cancel at that time unless it is a form they just really want/need to fill out.
  17. I amusing the following for the first time to send the form entries to my email box<code><form name="form1" action="mailto:me@mysite.com" enctype="text/plain" method="POST"></code>I get a box telling the user that your email address will be send and then that no profile exsists,what other methods i can use to just send the form entires, i dont want the users email/profile or any other information.???
  18. thisshould be a quickyi have a form linked with some php files and mysqli just want to html forms input fields to type in lowerecase only.
  19. user4fun

    Date

    how do i compare dates in phpexampleafter the $Edate ( meant to be Experiation Date) value is extracted from a sql serveri want to if current date (today) is after the $Datethen echo EXPIREDif current date( today) = $Datethenecho membership will end todayone or two more if statmentselseecho Status is valid untill $Dateecho ($Date - Current Date) XXX the different between the two date in days.If this seems to be too much, feel free to pinch at it and just pick a peice and toss in your two cents.
  20. user4fun

    Status

    I am familiar with php and mysql, actually the major idea is already designed based on if statementsthe things that i am not sure about are how to let all that start from a foreign website, like what kind off code to give them to start when the pages is loaded.also to extract the url and use it as a variable is also new to me.i am jsut trying to start onthe right foot. i am not a professional designer and i would hate to elarn a 1000 things just to combine 10 of them together.KNOW HOW TO DOlook up status in information table based on variable ( $sitename)produce results based on the if statmentin each if statment the appropriate hyperlink is also eays to do.DO NOT KNOW HOW TO DO1)the code that the would copy paste on their site to start all that without giving them anyusername/password to the mysql tables offcourse, i think maybe some inc files (include)2)extract the foreign site url and use it as $sitename ( php offcourse) to send over to my database and cross reference the infromation.NOTES:I am using the html forum because i was thinking the orginal copy paste code to give to people would be html.something like on page load run thisextract foreign urlsend to files on mysite ( the look up status and if statment)return the resultsbased on results produce the 3 different pictures with their hyperlinks.
  21. user4fun

    Status

    For all you addicts like myself that wil log on even on christmas dayMerry christmasthis is alittle over my head, but it will be a neat learning experience.Main Site = www.main-site.commain-site.com offers membership service to siteswww.foreignsite1.comwww.foreignsite2.com etc etc etc etcwww.foreignsites1 2 3 and all of them .com will be given a little code to display in their sitesthe code will log into mysql for www.main-site.com on the load of the foriegn site pageit will pick up the current url of the foreign sitelooks into table 'information' and find column 'status' where column 'site' = the url of the foreign site ( these tablese are already created in to mysql)if status = good view picture 1when clicked open new window and view page www.main-site.com/file1if status = in process view picture 2when clicked open new window and view page www.main-site.com/file2if file not found view picture 3when clicked open new window and view page www.main-site.com/file3any tutorials, starting points, examples or any advise you good folks would like to give me.i understand that the main first code will be in html, since the searching function will probably be php wince it works well with sql and the return would be in html format to support for most sites? or am i just confused.
  22. user4fun

    decimals

    awesome,work like a charm.thank you both for your time
  23. works like a charm, i did not know i had to open another php session. I thought the variables gets taken to the <body> of the next page and they would be available automatically.Little did i know,THANK YOU
  24. user4fun

    HTML table

    HTML pageuser inputs informationphp file is ran called results.phpat the end ofthe php file there is an html section that hold a tableone of the table rows have this in it<code> <tr> <td width="37%" bgcolor="#000080" height="63"> <p align="center"><b><font color="#FFFFFF" size="7"> HELP IN HERE </font></code>right where it says help in here i am tyring to display one ofthe variables called $ProfitEarnedfromt he php file results.phpTHANK YOU
  25. I love it when it works, thanks for reassuring me before i have wasted time for nothing.thank you again
×
×
  • Create New...