Jump to content

pulpfiction

Members
  • Posts

    1,210
  • Joined

  • Last visited

Everything posted by pulpfiction

  1. Use CSS property float:left for the tables....
  2. [im not really good at PHP]Since you have given same name for all the checkbox, when you do a $_POST['delete'] you will get the values of checked checkbox seperated by commas. then you can split and then delete the records.<input type='checkbox' name='delete' value=......
  3. Try this... dim str, slt' some sample textstr = "With ASP you can dynamically edit, change or add any content of a Web page, respond to data submitted from HTML forms, access any data or databases and return the results to a browser, customize a Web page to make it more useful for individual users"dim st, i, size' Mention number of characters to splitsize = 10i = 0st = 1while st<=len(str) slt = Mid(str, st, size) st = st + size i = i + 1 response.write(slt) response.write("<br />")wend
  4. You need to use the correct server name to connect to the database. Since its not in your local machine then mysql_connect("localhost"..... will not work. put the correct server name.Try this code below to check database connection.... <?php$username = "uname";$password = "pass";$hostname = "servername"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");print "Connected to MySQL<br>";mysql_close($dbh);?>
  5. It is not necessary to have but doesnt make difference in the SQL query. . [dot] is concatenation in PHP. so to join a string and a variable its like that.$str1 = "Bob";$str2 = "Good Morning" . $str1;echo $str2;Output: Good Morning Bob Since you are using SHA1() for password, so when you validate the login, you need to do the same process.... And now, if the password is correct then $_SESSION['logged'] will be 1.$pass = mysql_real_escape_string($_POST['pass']);$pass = SHA1($pass);$search = mysql_query("SELECT * FROM users WHERE `name` = '".$name."' AND `pass` = '".$pass."'");GET Method: In the login page where the user inputs username and password, you will have a <form> tag and in that change the "method" attribute to GET\<form method="get" action="nextpage.php">With this you must also change the current page too...$name = mysql_real_escape_string($_GET['name']);$pass = mysql_real_escape_string($_GET['pass']);
  6. Textarea is pretty much straight forward....<td><textarea rows="5" cols="20"><%= x.txtAreafld %></textarea></td>
  7. This might help.. [look for "Adding Users"]http://www.wampserver.com/phorum/read.php?...8927&t=8927
  8. Are you looking for something like this...http://www.asp101.com/samples/db_edit.asp
  9. This might help a little..http://www.serverwatch.com/tutorials/article.php/1476961
  10. Totally misunderstood the question, wrong post. sorry....
  11. First of all you will need a database to store all the employee information.... so when the user types the number then you can get the corresponding user information. so you need to decide on some database and get employee info. then learn ASP.NET/C# connectivity [with database]. query database and retrieve data. finally populate textbox with that data.ASP.NET & DB Conection.http://www.w3schools.com/aspnet/aspnet_dbconnection.asp
  12. I'm pretty new to PHP too.... eregi: Case insensitive regular expression match [Just make it easy to validate]. Email@domain.com is same as email@domain.com....Also it should allow .net and .co.in or anything like that...
  13. Try this to validate email.if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $YourEmail)) { // Valid Email mail( "author@tsrealms.com", "From $YourName", "$YourMessage", "From: $YourEmail" ); echo "<h1>Thank you for your message! One of the admins should be getting back to you via email within 24 hours.</h1>"; } else { echo "<h1>Please Enter a Valid Email Address</h1>"; }
  14. pulpfiction

    div questions

    Try this.... <html><head><title></title><style type="text/css">* {margin:0px;padding:0px;}body {text-align:center;}div#container {margin:0px auto;text-align:left;width:780px;height:800px;}div#left {float:left;width:30%;height:100%;border:1px solid #ff0000;}div#right {float:left;width:70%;height:100%;border:1px solid #0000ff;}</style></head><body><div id="container"><div id="left"></div><div id="right"></div></div></body></html>
  15. Google gave these results, checked first 2. they seem to be under $100....http://www.google.com/search?hl=en&q=m...amp;btnG=Search
  16. Well I tried the code and resize seems to be working fine. Are you asking about the "menu" frame size changing when the whole page [browser] is resized. i.e., when the browser window's size changed. Then you need to give a particular value [px] rather than giving a % value in the second frame.Replace <frameset border="0" cols="20%,*">with <frameset border="0" cols="200,*"> [200px]
  17. The order you check must be changed....1. isset($_REQUEST['Email'])2. ereg3. send email. if (isset($_REQUEST['Email'])) {if (ereg("^.+@\.com$",$_REQUEST['Email'])) {// Correct email idmail( "author@tsrealms.com", "From $YourName", "$YourMessage", "From: $YourEmail" );echo "<h1>Thank you for your message! One of the admins should be getting back to you via email within 24 hours.</h1>";}else {echo "ERROR: Enter valid email";}} //End of isset() IFelse{ echo "<h1>Please Enter an Email Address</h1>";}
  18. Try checking the following.1. give the variables without double qoutes...mail("****@tsrealms.com", $Email,$Subject, "From:" . $Email);mail($Email, "A copy of your Application", $Subject, "From: The Shattered Realms");2. As mentioned earlier put the echo ""<h1>Thank you for ......" inside elseif.Also are you getting some kinda error or just the mail doesnt go through?
  19. Can you post your code? "noresize" should work fine. http://www.w3schools.com/html/tryit.asp?fi..._frame_noresize
  20. If its going to be HORSEA1.jpg, HORSEA2.jpg to HORSEA12.jpg.. Try this code.... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><title> Assignment 9</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> #div1 {font-family: Eras Bold ITC;color: gray;font-size : 5em;z-index: 1;}#div2 {font-family: Eras Bold ITC;color: gray;font-size : 1em;z-index: 1;}#div3 {font-family: Eras Bold ITC;color: gray;font-size : 1em;z-index: 1;}</style><script language = "javascript" type="text/javascript">function validateit(){ if (isNaN(txtRow.value)){alert ("Please enter an integer for the number of rows.");txtRow.focus();return false;}else { if (isNaN(txtCol.value)){ alert ("Please enter an integer for the number of columns.");txtCol.focus();return false;}else{return true;}}} // Important Variable must be assigned to 1var ImageCnt=1;function showImage(){var imgStr;if (ImageCnt>12)ImageCnt=1;imgStr = "<img src='HorseA" + ImageCnt +".jpg' alt='HorseA" + ImageCnt + "' height=100>";ImageCnt++;return imgStr}function CreateIt(){var rCount; var cCount; var txtStr; if (validateit()){rCount = parseInt(txtRow.value);cCount = parseInt(txtCol.value);txtStr = "<html>\n<head>\n<title>Assignment 9</title>\n</head>\n<body>";txtStr = txtStr +"<table border='3'>\n";for (var i = 1; i<=rCount; i=i+1){ txtStr = txtStr + "<tr>\n";for (var j = 1; j<=cCount; j=j+1){ txtStr = txtStr + "<td width='120' bgcolor='yellow'>"var retret = showImage();txtStr = txtStr + rettxtStr = txtStr + "\n </td>\n";}txtStr = txtStr + "</tr>\n" ;}txtStr = txtStr+"</table>\n";txtStr = txtStr +"</body>\n</html>" document.writeln (txtStr);return true; }else{return false}} </script></head><body bgcolor="white"><div id="div1" align="center">Generating images in a table dyamically</div><table><tr><td width="281"><div id="div3" align="right">The number of columns</div></td><td width="277"><p><input type="text" id="txtCol" value="" /></p></td></tr><tr><td><div id="div2" align="right">The number of rows </div></td><td><input type="text" id="txtRow"value="" /></td></tr><tr><td> </td><td><input type="button" id="btnCreate" onclick="CreateIt()" value="Create the table" /></td></tr></table></body></html>
  21. that should not be the problem.... [if id="container" is a DIV]div#container {....} is same as #container {.....}
  22. Are you asking something like this....<script>function test() {// Return URL, will NOT work // return "http://www.google.com"// to redirect, this will work window.location="http://www.google.com"}</script><a href="java script:test();">Redirect URL</a>
  23. Not sure if I completly understood your question....... If you are asking about [example below]<div class="some_name".......>Its for using CSS style. Link below about CSS class should help. http://www.tizag.com/cssT/class.php Are you asking about "tabindex"? It gives order of section when you hit tab.....http://www.htmlcodetutorial.com/forms/_INPUT_TABINDEX.html
  24. Server side scripting languages:PHP: http://w3schools.com/php/default.asp or http://php.net/ASP: http://w3schools.com/asp/default.asp
  25. Width of the table remains 450px in both cases. When you add padding then its added to the width mentioned by javascript and left cell width will be 50 [width] + 25 [padding] = 75px. this will reduce the width of the second cell to 375px.So subtract padding 25px from width 50px for the 2nd cell to be 400px.
×
×
  • Create New...