gigas10
Members-
Posts
64 -
Joined
-
Last visited
Never
Everything posted by gigas10
-
header("location: nameoffile.php"); should suit your needs.
-
Looping dilema which one FOR or while or both
gigas10 replied to Voodoo Jai's topic in PHP Coding Help
faster? it doesnt matter until you have over 100 million rows -
where exactly are you posting score? $score = $_POST["score"]; this line makes no sense.
-
Looping dilema which one FOR or while or both
gigas10 replied to Voodoo Jai's topic in PHP Coding Help
$qry = mysql_query("SELECT * FROM table01"); $row = mysql_num_rows($qry); gives you the number of rows in a table. -
<?php echo $_SERVER['PHP_SELF']; ?>
-
what exactly are you trying to do?
-
How to send mass subscriber based mail (mailing list)
gigas10 replied to abeall's topic in PHP Coding Help
It would be up to the user to make sure the email is not marked as spam. -
Well don't do that, just notify the user that the login name is already in use. On your registration page, use this code <?php if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) { echo '<ul class="err"><strong><font size=5>'; foreach($_SESSION['ERRMSG_ARR'] as $msg) { echo '<li>',$msg,'</li>'; } echo '</ul></strong</font>'; unset($_SESSION['ERRMSG_ARR']); } ?> then make a register-exec.php and use this $qry = "SELECT count(*) AS c FROM members WHERE login='$login'"; $result = mysql_query($qry); if($result) { $result_array = mysql_fetch_assoc($result); if($result_array['c'] > 0) { $errmsg_arr[] = 'Login ID already in use'; $errflag = true; } @mysql_free_result($result); } else { die("Query failed"); } And obviously modify the select queries as needed. This last piece of code checks to make sure that none of the required fields are missing, add more if u need. if($login == '') { $errmsg_arr[] = 'Login ID missing'; $errflag = true; } if($password == '') { $errmsg_arr[] = 'Password missing'; $errflag = true; }
-
Use an array?
-
Use ajax/xml to grab the browser, then from there use another css file that works for ie by created a simple js script. if(browser.isIE) { iecss.css; } if(browser.isFF) { ffcss.css; } so on, look up some ajax tutorials
-
You said you made a full css template? Then why did you save it as a php file. Resave the file as a .css extension and use this code anywhere before the head tag ends. <link href="template.css" rel="stylesheet" type="text/css" />
-
The limitations of php are pretty much endless. You just gotta be elite
-
calculate difference between 2 days without holidays
gigas10 replied to prince198's topic in PHP Coding Help
Turning the dates into seconds usually works pretty good 60*60*24*365. Although this isnt completely accurate because of leap years -
The problem is the line echo "<a href='index.php?id=", $id, "'>", $firstname, "</a>"; The formatting is wrong and the quotes are causing the echo statement to end early. Format it like I said and it will work.
-
<?php echo "<h1> Hello $name </h1>"; if ($action == "b1") echo "you just clicked button 1"; if ($action == "b2") echo "you just clicked button 2"; ?> Thats because $action is not defined in this php file. Define action before the if statements and it will work
-
Did you try what i said?
-
You do not want to echo html because it does not format properly which can make it hard for people reading the html. Also, usually a blank page means syntax error, most likely a missed ; or }
-
?> <a href="index.php?id=<?php echo $id; ?>"><?php echo $firstname; ?></a> <?php echoing html is a bad habit
-
Ummmm... what?
-
I would guess sha1, since it was designed by the NSA. But who knows since it's easily crackable, however I do know that its impossible to figure out what the password was from a php made md5 hash.
-
Once again, trust no one but yourself, and becareful about trusting yourself. DO NOT allow users to directly access a database table, this could result in some bad bad stuff. Just make a php page that does all the query's for them and either retrieves / inserts data into the table and display it nicely.
-
Theres a php mail() function. http://www.php.net/manual/en/function.mail.php
-
Problems with Checkboxes and displaying results
gigas10 replied to jviney's topic in PHP Coding Help
Just set up columns for each checkbox, like alcohol, food, w/e. And store them as 1's and 0's, 0 for no 1 for yes. Will be faster.