Jump to content

user4fun

Members
  • Posts

    573
  • Joined

  • Last visited

Everything posted by user4fun

  1. user4fun

    variables

    i am not sure what you mean sir, can you please maybe give me more details
  2. user4fun

    variables

    how long can a variable be moved from page to page.reasonpage 1 = user input then clicks command buttongoes to page 2 = variable has moved and query took place then another command button.goes to page 3, which i would like it to do another query on the same variable but by page three the variable does not exsists??how can i keep it and move it from page 2 to page 3
  3. user4fun

    = Uuer Input

    this is user4fun the person that suppose to ahve started this thread,I dont think i have ever wrote this thread, nor have i read it before?? lol
  4. user4fun

    combine 2 codes

    thank you for your help, i did look alittle and did find the post underneath me and did read the semicolon post that may seperate them and i was not sure about the syntax of that nor could i find a sample .thank you for your time.
  5. user4fun

    combine 2 codes

    this may seem to be weired but hey, for a very small business, it might just what i am looking for.i have created table, yada yada yadathe forms the insert, select , yada yada yadawhat i am trying to do is combine another insert statment with the select statment, here is what i have<html><head> <title>THANK YOU</title></head><body><?php echo "You are searching for the status of <b>$ui</b><br>"; //this works$link = mysql_connect("", "", ""); //this works mysql_select_db("Business"); //this also works$query = "SELECT * FROM Profile WHERE Domain='$ui'";$result=mysql_query($query) or die ("could not execute");$row = mysql_fetch_array($result,MYSQL_ASSOC);extract($row);if($ui == $Domain){ echo "SOME TEXT <b>$Status</b><br>"; include("/inc/StatusList.inc"); }else{ echo " some text"; //up to this point every thing is fine}here is what i need to add another statment INSERT INTO checking (checkID, checked) VALUES (' ',$ui);?> </body></html>
  6. apparently according to other online forums you cannot have php open the result in a new window.example<form method=post action=AddEmail.php><input type='text' name='em' value = 'Protecting'size=15><br><input type='submit' value = 'Signup'></form></td></tr></table>"; AddEmail.php file has a thank you page.www.domain.com/AddEmail.php file be opened in a new window and any one have a link to a tutorial.
  7. This is just a quicky, i have a form that includes a text box with a default value.How can i make the default value be highlighed when the cursor is inside the text box so they would not have to do it themselves and then delete.
  8. user4fun

    SPOT the NOT

    woho, we are getting somewhere,one last issuethe result was "Could not connect to MySQL"under the url AddInfo.phpwe are almost there, i am going to say that you are the king and the bold statment was right on the money.I will keep playing with for a while to find out why i got that message.If you have any ideas, please feel fre to share.THANK YOU VERY MUCH FOR HELPING THIS FAR.
  9. user4fun

    SPOT the NOT

    thank you for trying to help so far my php file that is suppost to conenct or say die could not connect shows up as an empty file.and the record does not get addedhere is all i have maybe the problem is from the root.FILE 1 enter.php<html><head> <title>Untitled</title></head><body><?phpecho " <table border='0' width='100%' cellspacing='0' cellpadding='0' bgcolor='$mail_bgcolor'><tr><td><font face='Verdana' size='2'>Sign up for newsletter</font></td></tr><tr><td align=center><form method=post action=newsletter.php><input type='text' name='em' value = 'Your Email' size=15><br><input type='submit' value = 'Signup'></form></td></tr></table>"; ?> </body></html>FILE 2 newsletter.php<html><head> <title>Untitled</title></head><body><?phpforeach ($_POST as $field => $em){ echo "your submitted email address is $em<br>";}echo " <table border='0' width='100%' cellspacing='0' cellpadding='0' bgcolor='$mail_bgcolor'><tr><td><font face='Verdana' size='2'>Thank you for signing up, click submit so we would add you to the mailing list</font></td></tr><tr><td align=center><form method=post action=AddInfo.php><input type='submit' value = 'Add Me'></form></td></tr></table>"; ?></body></html>FILE 3 AddInfo.php<html><head> <title>Untitled</title></head><body><?php$host="http://aaa.aa/aaa_aaa/"; // Host name, it is not really aaaa lol $username="cccccc"; // Mysql username , cc is reaplaced with my username$password="*******"; // Mysql password , the stars are replaced by my actuall password$db_name="Customer"; // Database name $tbl_name="subscribe"; // Table name $db = mysql_connect($host,$username,$password)if(!$db) die("Unable to connect to MySql");@mysql_select_db($db_name) or die("Unable to select database");$query="INSERT INTO subscribe (em,status) VALUES ('$em', 'subscribe')";?></body></html>and that is it folks, i am just not seeing it lolthankx for reading this far.
  10. user4fun

    SPOT the NOT

    no errors, but the tables never gets any new records??zip, nada, nothing, the table gets nothing.
  11. user4fun

    SPOT the NOT

    I can't see why this is nor working but ooh well, take a crack at it if you well<html><head> </head><body><?php$host="http://mydomain.com/directory where mysql is installed/"; // Host name $username="my user name"; // Mysql username $password="mypassword"; // Mysql password $db_name="Customer"; // Database name $tbl_name="subscribe"; // Table name $status = "OK"; // setting the flag to check the status$msg=""; // setting the variable for messageif (!stristr($em,"@") OR !stristr($em,".")) {$msg="Your email address is not correct<BR>";$status= "NOTOK";} echo "<br><br>";if($status=="OK"){// Now the email is valid and we can add to our database$query=("INSERT INTO subscribe (em,status) VALUES ('$em','subscribe')");$result=mysql_query($query);echo "<center>THANK YOU <br>Thanks for subscribing to our newsletter and any time you can unsubscribe by clicking a link in your newsletter. </center>"; }else {echo "<center>$msg </center>";} // this will display the error message if email address is not valid one.?> </body></html>
  12. if i would start my php files with *************<?php$host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="guestbook"; // Table name ********************in order to connect to mysql and add, update, insert records and stuff? What would happen if someone uses their Internet explorerto click on view, then source?that would give them my local host, username, password, and everthing else right???if that is correct, how can i make that information invisible or something?
  13. Thank you for trying to help, i had to leave it alone for a day so i can come back with a fresh brain.her is what i ahve in my php file ( sadly enough it seems to be all wrong)***************************8<html><head> <title>Email PHP add</title></head><body bgcolor="white"><?phpforeach($HTTP_POST_VARS as $varname => $value) $formVars[$varname]=$value;INSERT into NewsLetter(Email) VALUES($Email)mysql_select_db("Customer");echo "Record Added<br><a href=\"NewsLetterList.htm\">click here</a>to return to Business Information Control<br>";$query="INSERT INTO NewsLetter"."Email= \"".$formVars["Email"]."\","."Status= \"".$formVars["Status"]."\",".mysql_query($query);mysql_close($db1);?></body></html>****************************I got all that from different tutorials and sample codes, offcourse nothing is working is i am wrong.
  14. user4fun

    Crazy with insert

    for the love of god please helpI am going crazy trying to find information and they are all too complex for me.All i want is a form with a text box called email and a submit button //already created called NewsLetterList.htmwhen the submit button takes place the AddEmail.php is ranwhen the php file is ran it adds the email address from the form in a table called newsletter under a database called customer. //both have already ben created. ther is no username password, this and that? just a form, a button, and a table.\PLEASE IF YOU CAN DO THIS AND I AM SURE YOU CAN, HELP ME, i truly am going crazy?????
  15. user4fun

    record not adding

    I am really stuck in this one, Ii just can't get it working.when i check my table after running this code, the record never gets added.If you happen to spot the problem ( i am sure most of you will) please drop me a quick post and guide me)// the table in which i am adding this record is called (BusFile) it is under a database called (Business)<html><head><title>Business PHP add</title></head><body bgcolor="white"><?phpforeach($HTTP_POST_VARS as $varname => $value)$formVars[$varname]=$value;$db1=mysql_connect($dbhost, $dbuname, $dbpass);mysql_select_db("BusFile");echo "Record Added<br><a href=\"BusinessAdd.htm\">click here</a>to return to Business Information Control<br>";$query="INSERT INTO BusFile set "."Status= \"".$formVars["Status"]."\","."Fname= \"".$formVars["Fname"]."\","."Lname= \"".$formVars["Lname"]."\","."Email= \"".$formVars["Email"]."\",".mysql_query($query);mysql_close($db1);?></body></html>
  16. user4fun

    Syntax help

    if this is too much to ask for for it to be free, i would atleast appreciate a link or a tutorial site?
  17. user4fun

    Syntax help

    What do i need to finish this off 9 sorry noobie here)<code> <html> <body> <form> <input type="text" name="NewEmail" size="20"><input type="submit" value="Submit" name="JoinList"> </form> <? // I am sure i need more code here INSERT INTO tblNewsLetter (Email) VALUES ('NewEmail from the textbox in the form') ?> </body> </html> </code>
  18. This is very simple and i am very new but if i learn this i think it will open alot of doors to answer tons of questions i may have. I am just trying to create page with a textbox and a command button textbox name = NewEmail Command button = JoinList when the textbox is filled and the user hits the command button the table (mysql) tblNewsLetter would add a new row and enter the new information in the column 'Email' do i need to have an html page to create the textbox and the command button and then a php section calling for the table INSERT. if that is correct, i would greatly appreciate an example. or a quick sample code Thank you very much. if it helps any i got this far <code> <html> <body> <form> <input type="text" name="NewEmail" size="20"><input type="submit" value="Submit" name="JoinList"> </form> <? // I am sure i need more code here INSERT INTO tblNewsLetter (Email) VALUES ('NewEmail from the textbox in the form') ?> </body> </html> </code>
  19. user4fun

    Table type

    For the love of god can someone please tell me where i can find information about mysql with phpmyadmin??I am going crazy trying to find out what collation and table type are???please help ...and how in the world do you create Foreign keys to link table together
  20. user4fun

    = Uuer Input

    SELECT LastName,FirstName FROM Persons Where LastName = ' The information the user entered tectbox called 'InfoReq' " Must be exact match, not case sensitive"I would greatly appreciate the help
  21. I amreally new to php and the tutorial on this site are great but you guys that go out of your way to help the simple guys like my self is even greater.I would like some guidance to teh followingI have a textbox wher a user inputs a value "textbox called InfoRequest"then they would click on a caommand button called "Search"the sql issue is SELECT Name,Status,State,StartDate FROM BusInfo WHERE Name= InfoRequest Boxhow would i make it find the records that have the value the user entered in the InfoRequest textboxyou wonder why i am asking this under PHP, well because at the same time i need to have a conditional if statment.If record foundthen pretty much show the recordselsewould go to an error page called NotFound.phpexcuse my simple knoweldge, i am learning and without you guys i would not even know that i can do these things with mysql and php.
  22. user4fun

    Starting Point

    I am new at this sql thing and i need some guidance pleaseI am building a website, i am hosting it through yahoo web hosting standard plan that suports mysql and php.My objective is very simple just one table that would store contact information name address city state and such. THAT IS ITMy problem is i have researched coding sql and i pretty much have what i want but it is on a microsoft word document just to save the codes.I dont know where to write the code? do i need to download a specific program.do i write the code in the middle of the html page and have a start and end tags for it?Please help.The more info the better?
  23. is there a specifc way to limit it to certain links instead of all of the links on the page?
  24. <code>Thank you so much for your help, and if you would be so kind to help me with one more questionI tried to change the original color to blue instead of black and it stoped working<body><style type="text/css">a:link {color: auto;text-decoration: underline}a:visited {color: auto;text-decoration: underline;}a:hover {color: red;text-decoration:bold}a:active {color: red;text-decoration:none}</style><p><b><a href="presult.htm"><font color="#0000CC">Result</font></a></b></p><p><b><a href="cal.htm">Cal</a></b></p></code>and i am also trying to limit that to the link on vertical bar just like the one on this site where it sayslearn htmllearn csslearn javascriptetcetcetc
  25. I cannot find an example for mouse over font changes with javascript? or shouldibeusing something elsei just need for fon to change color to red and lose the underlining when mouse is overthank you all
×
×
  • Create New...