Jump to content

pulpfiction

Members
  • Posts

    1,210
  • Joined

  • Last visited

Posts posted by pulpfiction

  1. Not the website.... what serverside scripting language are you using [php, ASP...... ??] post the code from the file. guessing it should be Index.asp or Index.php... something like that.

  2. Code below shows a simple demo.....

    <html><head><script type="text/javascript">function over() {alert("Onmouseover function working");}function out() {alert("Onmouseout function working");}</script></head><body><a href="#" onmouseover="java script:over();" onmouseout="java script:out();">Click here</a><!-- Calling javascript function defined in head/script section above --></body></html>

    More info.....Onmouseover: http://www.w3schools.com/jsref/jsref_onmouseover.aspOnmouseout: http://www.w3schools.com/jsref/jsref_onmouseout.asp

  3. [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=......

  4. 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

  5. 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);?>

  6. is it necessary to have the apostrophes around 'name' and 'pass'?
    It is not necessary to have but doesnt make difference in the SQL query.
    why did you put ".$name." instead of "$name"?
    . [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
    I used SHA('password')?
    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']);
  7. 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...

  8. 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>"; }

  9. 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>

  10. 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]

  11. 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>";}

×
×
  • Create New...