Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Unexpected $end? Simple code, don't know whats wrong
Jessica replied to PirateBagel's topic in PHP Coding Help
Yes. -
Don't you think your employer might be a better resource here?
-
you didn't change anything...
-
Unexpected $end? Simple code, don't know whats wrong
Jessica replied to PirateBagel's topic in PHP Coding Help
if ($redirecturl != "") { header("Location: $redirecturl"); include("contactform.php"); Unclosed if{ brackets. -
Try this. $email = mysql_real_escape_string($_POST['email']); $emc = mysql_query("SELECT actid FROM activate WHERE actemail='$email'");
-
$emc = mysql_query("SELECT actid FROM activate WHERE actemail = {$_POST['email']}") or die(mysql_error()); That will print an error for you.
-
No...don't do that - fix the script! Register Globals should never be on, it's a security hazard and it leads to poor coding practices, like the script here.
-
Use the http://us3.php.net/manual/en/function.imagepng.php, imagegif, or imagejpeg functions.
-
You're trying to use your script as if register_globals was on. It's not. you need to get the variables, like I did in my example.
-
Read the page on php.net/session_unregister From the manual: php.net/session_id Note: When using session cookies, specifying an id for session_id() will always send a new cookie when session_start() is called, regardless if the current session id is identical to the one being set. They're older ways of using sessions, which may still work for some things, but should be avoided, like using register_globals "Use of $_SESSION (or $HTTP_SESSION_VARS with PHP 4.0.6 or less) is recommended for improved security and code readability. With $_SESSION, there is no need to use the session_register(), session_unregister(), session_is_registered() functions. Session variables are accessible like any other variables."
-
Which is? is $cmd being defined?
-
Change it to $before = trim($_GET['before']); and use if(strlen($before) == 0)
-
Because they are different browsers. session_id('stationid'); session_start(); session_unregister('stationid'); Are you using code like this in the rest of your site? Try never setting a session id, and don't use session_register, etc. just use $_SESSION You can also use these header commands header('Pragma: no-cache'); header('Cache-Control: no-cache, must-revalidate, max_age=0'); header('Expires: 0');
-
Still can't get the data pulled from MySQL field
Jessica replied to sydewyndr's topic in PHP Coding Help
Did you look up the function in the manual before using it? mysql_select_db($database) or die('Could not connect to the Database'); You want to copy that only make it the other database, the one that has the tables the code is looking for. -
You don't HAVE to delete that cookie. That's just the session ID, and as long as you're not basing your sessions on the ID's, you'll be fine.
-
Still can't get the data pulled from MySQL field
Jessica replied to sydewyndr's topic in PHP Coding Help
mysql_select_db()/ -
use strip_tags() or Pear's HTML_Safe All the string functions are here:http://us3.php.net/manual/en/ref.strings.php
-
$p = md5($p); $sql="SELECT * FROM customer WHERE uname='$n' AND pwd='$p'"; $result = mysql_query($sql); if (!$result) { $row = mysql_fetch_assoc($result); $_SESSION['fname'] = $row['fname']; }
-
[SOLVED] How to make php print errors on screen again ?
Jessica replied to adrianTNT's topic in PHP Coding Help
You may also have to change log_errors, error_reporting, etc. Check through the appendix on php.net -
I read that one, and it looks way more complicated than the image method. I'll stick with faux columns for now I guess. I like comment #9 there. "Opening a keylock with a paperclips is an ingenious and spectacular magician’s act. But would you seriously buy such a lock? Using negative margins is an unintended use of the standard. Boxes don’t have negative margins. How a browser handles them is not a bug but an implementation choice (a respectable one being to simply ignore out of range values). A standard defines what can be done, but also what should not be done (even if it can be done). This is where many css techniques abuse the standard. I think this is a real issue. As a newbie, I buy solutions such as this one, thinking that I am investing in a solid foundation. Then I try to add a menu or an image or even a simple italic, and have no clue why things suddenly mess up. As it dawns to me that I am really investing in implementation exploits, I am ready to throw away this whole css mess altogether. Now that would be an unintended consequence? My apologies if this sounds as a harsh critique on this work. It is a superb solution to a real problem. Only it requires a magician to make it work in daily life."
-
No. If you can't find it in your browser, the file isn't being uploaded properly, as it's not actually on the server.
-
Add a boolean field to the laptop table called "available" or something. When you loan one, mark it as not-available. Have your select get all WHERE available = 1
-
It depends on what it is, honestly. Thumbs Up/Down is good for interactions - or small decisions. 5 stars is better for content, like the tutorials on this site.
-
Still can't get the data pulled from MySQL field
Jessica replied to sydewyndr's topic in PHP Coding Help
Find the code that is trying to access those tables.