Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
If you want it to happen without leaving the page, javascript.
-
Same thing, you can't edit that $_POST that way, AFAIK. $_POST['pass'] = md5($_POST['pass']); if (!get_magic_quotes_gpc()) { $_POST['pass'] = addslashes($_POST['pass']); } Needs to be : $pass = md5($_POST['pass']); if (!get_magic_quotes_gpc()) { $pass = addslashes($_POST['pass']); } You should also use mysql_real_escape_string(), not addslashes(), as you're using mysql
-
Multi dimensional Array, retreiving index value, not data type
Jessica replied to PC Nerd's topic in PHP Coding Help
The same way you did in the second foreach... foreach($ARRAY_EG as $k=>$index1) { echo $key -
well the passwords aren't encrypted, so comparing the md5(password) to the password in the db will always be wrong.
-
Put them after you get the user info.
-
$array[$string1] = $string2; I swear you've asked this before.
-
do a print_r($_POST); and print_r($info); and compare them. Is the info the same, it's getting the right user, etc? I don't think you can do this: $_POST['pass'] = md5($_POST['pass']); use $pass = md5($_POST['pass']); and check that.
-
Yes, there are tutorials on THIS SITE for user registration/login systems.
-
I guess I'll have to use the faux-columns one.
-
wildteen: It worked in 6, then I changed some stuff that broke in Fx, so it probably broke again by the time you saw it If you find that tutorial, I'd really love to see it. Thanks I'm off to scour Google. Edit: The method I normally use is to make a background image and tile that along the container div - I'd like to try to avoid that this time and see if I can actually get the divs to work right. Edit2: Here's an interesting JS approach: http://tylerkaraszewski.com/experiments/equalheightdivs/equalheightdivs.html Not going to use it, but maybe someone else will.
-
Well it works in IE, but not Firefox.
-
That still didn't work. Here's the page, changed: http://grady.us/scrapbook/ <div id="introBar"> <div id="about"> <h1>About</h1> <p>blah blah</p> </div> <div id="browse"> <h1>Browse</h1> <p>blah blah</p> </div> <div id="join"> <h1>Join</h1> <p><?=SITE_NAME?> is free and it only takes a moment to join, so register now!</p> </div> </div> #introBar{ height: auto; } #introBar div{ width: 240px; padding: 5px; float: left; font-size: 1em; color: #FFFFFF; height: 100%; } #introBar div h1{ height: 55px; overflow: hidden; line-height: 100; font-size: 0; } I also tried #introBar{ min-height: 400px; height: auto !important; height: 400px; }
-
== is a comparison operator. = is an assignment operator. You also need a ; at the end.
-
Yesi: Not if it's only one line. That's not the issue here. It is good practice to always use braces though.
-
There are plenty of ways to do this. If you want someone else to do it for you (a person, not software) then you might try the freelancing forum. Also: Facebook, MySpace, you're a bit late
-
The the variable wasn't posted. Use if(isset($_POST['variable'])){ //something }else{ //something else. }
-
Yep, take out those last two rows. We don't need them as we are using a while loop to get the results. Seriously, don't use dreamweaver - you're making it a lot harder on yourself in the long run.
-
$sp_sql=mysql_query("select DISTINCT poked from pokes where poked IN($poked_by) && poke_deleted='n' && !poked IN($double_pokes)") or die(mysql_error()); Get any errors?
-
You don't have mysql_fetch_assoc($booked) anywhere BEFORE while($row_booked = mysql_fetch_assoc($booked)){ do you? Because that will take the first row, then the while moves it to the second before you can put the first in the array.
-
See how when you do print_r($bookings), it only shows 2 and 6 as keys? Obviously 1 isn't being selected for some reason. Are you sure it should be in the result set? Edit: Just saw the database shot. One second.
-
It helps if I follow my own advice sometimes Here's the CSS: .introBar{ width: 240px; padding: 5px; float: left; min-height: 400px; height: auto !important; height: 400px; font-size: 1em; color: #FFFFFF; } #about{ background-color: #353535; text-align: justify; } #browse{ background-color: #404040; } #join{ background-color: #474747; } The HTML: <div id="about" class="introBar"> <h1>About</h1> <p>Blah!</p> </div> <div id="browse" class="introBar"> <h1>Browse</h1> <p>blah blah</p> </div> <div id="join" class="introBar"> <h1>Join</h1> <p>Blah</p> </div>
-
Sorry, can you post the whole code again, what you have now?
-
How can I stop the output from expanding the width of the page?
Jessica replied to proud's topic in PHP Coding Help
Nested Tables...icky. Try printing it out using <p> or <div>, or <span> - something easier to read and maintain. If you have to use a table, there's no reason to nest them. <?php $tbl_name2="forum_answer"; $sql2="SELECT * FROM $tbl_name2 WHERE question_id='$id'"; $result2=mysql_query($sql2) or die(mysql_error()); while($rows=mysql_fetch_array($result2)){ ?> <p><strong>ID</strong>:<?php echo $rows['a_id']; ?><br /> <strong>Name</strong>:<?php echo $rows['a_name']; ?><br /> <strong>Answer</strong>:<?php echo $rows['a_answer']; ?><br /> <strong>Date/Time</strong>:<?php echo $rows['a_datetime']; ?></p> <? } ?> -
listing db content as a form.. need to make each unique with array.. ??
Jessica replied to jwk811's topic in PHP Coding Help
In the form, you need to associate each detail with the ID, then do a WHERE id=$id in your update. It's probably easiest to only let them update one at a time.