Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
STDIN is not a resource handle. Read the manual on how to use this function http://us2.php.net/fgets
-
Right, I thought both were U. Either way, what is the MISSING one? I have asked several times exactly which one you think is missing, and you keep saying Line 38. Well, I told you the input named in line 38 is IN the $_POST.
-
Displaying either Default image vs Image that exists?!?!
Jessica replied to suess0r's topic in PHP Coding Help
But what happens when you print out $myImage? Just ignore the loop for a moment and do <img src="'.$myImage.'" /> Does it even show up? Does the image actually exist? What is the value of myImage at this point? -
You need to use $news_id = $_GET['news_id']; Read about register_globals.
-
yes, only don't call it the same as your other php files or you'll overwrite them. Also, this has to be on the same server you're using, not your local computer.
-
Displaying either Default image vs Image that exists?!?!
Jessica replied to suess0r's topic in PHP Coding Help
Can you post the new code? Where is $id coming from? It's possible it's not set. Do print $id; to make sure it's what you expect. -
Create a new blank PHP page, and do this: <?php print mail('info@mediashox.com', 'test', 'test', 'From: "Testing" <info@mediashox.com>').'<br />'; print mail('info@mediashox.com', 'test', 'test'); ?> You should see: 1 1 If you do, the mail function is working fine. Next step is to check your mail and make sure you got two emails containing Test. If you did, it's the flash, if not, it's the server, and you can show this to the tech guy, that the mail is being accepted for delivery, but not delivered. If you don't see two 1's, there is a problem with your PHP setup.
-
$content = "Name:".$_POST["name"]." Address:".$_POST["address"]; Name and Address must be capitalized, as that's how you did it in your flash. PHP is case-sensitive. Change to: $content = "Name:".$_POST["Name"]." Address:".$_POST["Address"];
-
address is probably misspelled in your form. do print_r($_POST) to see what post vars exist.
-
So when you do Can you try this? function close(){ print $this->connection; mysql_close() or die(mysql_error()); } It should say something like Resource ID #, right? You also don't need to supply the connection, so try it without.
-
<td>High p </td><td><input type="text" name="E_U_High" value="12.702" size="4"></td><td></td> <td>High p </td><td><input type="text" name="E_C_High" value="12.970" size="4"></td><td></td> Those two have the same name, as do many others. Which is the one that isn't showing up for you? I see all of them. Line 38 is the "G_Kwh" one, which is in the POST array I copied. It works fine...
-
Displaying either Default image vs Image that exists?!?!
Jessica replied to suess0r's topic in PHP Coding Help
You need to use the full path likely. What is the relation of the /images folder to the folder this file is in? -
Are you closing the browser entirely, or using Firefox and closing tabs? You have to close the entire browser. Perhaps you are caching the pages. Next time you go to the page, and it looks like the session is still there, hold down SHIFT and hit your refresh button. (This is a cache-clear refresh). If none of this helps, can you post a link, let me try it?
-
You know you have several inputs with the same name, right? Anyway, when I do it, the box on line 38 shows up in the list. Array ( [E_U_High] => 12.702 [E_C_High] => 12.970 [E_Units] => 4844 [E_U_Low] => 7.292 [E_C_Low] => 5.560 [G_U_High] => 3.422 [G_C_High] => 2.912 [G_Units] => 480 [G_U_Low] => 2.417 [G_C_Low] => 1.619 [G_Kwh] => 12 [submit] => Calculate )
-
No, the # button in the list of buttons. Not the key on your keyboard, the BBCode Buttons!
-
Does it really cost a lot to host a medium traffic website?
Jessica replied to twilightnights's topic in Miscellaneous
He's probably using six really crappy servers in his home or something. Most dedicated servers cost about $100 a month and that should be more than enough to handle his traffic. -
Sessions do expire when the browser closes. They default to 30 minutes of inactivity. If you want it to only last a certain amount of time regardless of user activity, when the session starts save the timestamp, and on every page check if it's been past your time. If it has, close the session and log them out. http://us2.php.net/session
-
Orio has a very good point. Slat, lol.
-
Click the reply button instead of using quick reply. Copy and paste all the text into this form, including your opening <?php tags. Then highlight all the code, and press the # button. This will put it in code tags. This makes it easy for us to read and help you.
-
No there is not. At the top of your processing page, add print_r($_POST); and you will see all of the posted variables. If you still can't get it, post the HTML and PHP.
-
"how a program with them all over the place can be fixed." Turn notices on, and go through and find them :) Normally it's a simple matter of using an undeclared variable, which I always found to be a good thing in PHP. I guess catching those can help eliminate risk when register_globals is on. *shrug*
-
Yeah every now and then I accidentally use a reserved MySQL word without knowing, and after a few minutes of trying to debug a query that looks fine, I always check the list. I looked up functions, etc in the manual, but it didn't occur to me that print was a reserved PHP word. :D
-
[SOLVED] Passing a variable (with variables in it) to a function
Jessica replied to jeffery1493's topic in PHP Coding Help
You may need two functions to do this, or to make the argument an array rather than a string and several strings. You have it accepting 5 arguments one place, then 1 another, you seem to want two different functions. Just make two different functions. -
Plus, it won't work in Firefox or for those with popup blockers, and the rest of your visitors will likely be annoyed. If someone wants to hear music, they'll have it playing. Let them choose when they want to listen to the music, forcing music to play is considered very rude.
-
$image is a string, so doing $image[0] gets the first letter in the string. What are you trying to do? Print out many images? If it should be just one image, there is no need for a foreach. If it is many, you'll need to move the echo into the loop, and just print $image, not $image[0]