ober
Staff Alumni-
Posts
5,327 -
Joined
-
Last visited
Everything posted by ober
-
I love it when we get all the information up front. [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] I suggest you read through the installation manual again.
-
You should be able to nest switches no problem.
-
Umm... what's this? [code]<? if(!$_SERVER['QUERY_STRING']) { ?>[/code] That's going to stop it from loading the page if you have anything in the $_REQUEST array.
-
You missed Micah's point. Nowhere in what you've posted does it show a submit button in the form. You MUST have a submit button or an "onclick" event in the checkbox that calls a javascript submit event.
-
What are you using to edit the MySQL tables? It should say in there what the name of the database is. If it is, in fact, "_inv", then that's all you should have to put in there. Remove the @ symbol from the mysql_select_db() function and see if you get any errors.
-
Here's the thing that confuses me. I could understand if it's not running the PHP, or you're getting some kind of error, but the weirdest thing is that you're not getting any errors, all the content around this is showing up, but NONE of what you're posting is showing up in the source. The details of the dog should at least be showing up, even if the picture doesn't. Can you post the code for the entire page? It's like you're forgetting to include something... or you have something else that is blocking out that entire chunk of code.
-
Is the DNS server set to point to the computer that is running EasyPHP?? If you have a domain name, who does the hosting of that domain?
-
That wasn't so hard, was it? Your while loop is never going to go anywhere. You set it to 1 and then immediately check to see if it's less than 1. Better:[code] if (isset($_POST['id'])) { foreach($_REQUEST['id'] as $val) { $sql = "UPDATE client2 SET FA = '1' WHERE id='$val' "; $result = mysql_query($sql) or die("Invalid query: " . mysql_error()); } } [/code]
-
2 things: 1) change: [code]<img src="immagini/allevamento/<?= $image; ?>" alt="Gunther dei Roeri" width="310" height="260" />[/code] to (note short-tag change): [code]<img src="immagini/allevamento/<?=$image?>" alt="Gunther dei Roeri" width="310" height="260" />[/code] And if that doesn't fix it, change $_REQUEST to $_GET in case you have a variable with "id" in a SESSION or something like that.
-
Try removing the processing code and just loading the form to see if that works.
-
Can you post your full/updated code again? What Crayon Violent posted should work.
-
Well, I'm not sure why you put your form up above the processing code, because if you hit errors, wouldn't you want the form to show again with the errors showing? Other than that, I'm not sure what's going on. If you look at the source, is the code for the form there? If it is, I'd say you have a layout issue, not a PHP issue.
-
Slightly, but it shouldn't be an issue and #1 WILL NOT WORK. Period. If I were to look up the IPs that I've used personally to log into this site, I'd probably find at least 8-10. And I use a variety of web browsers, so the second part of that isn't going to work either.
-
You would have to place a script on each page to count the number of times the page is viewed and update either a flat file or a database and then you'd have to figure out where to stick the stats in. To pay someone to do this shouldn't be that expensive. If you want to go that route, post in the freelance board.
-
I suggest you at least make an attempt and then post what you have. No one here is just going to write it for you.
-
#2 is a better way to go. #1 is dependent on the user always using the same IP (that's going to fail) and also depends on the user-agent (also a very bad idea). I'm not even sure why you're considering #1.
-
err... Nevermind... didn't realize EasyPHP was a complete package with all of that. What address are you typing into your browser from the LAN? You should be using the IP of the computer with the webserver installed.
-
That can be done, it's all a matter of how. Do you have access to cron jobs or scheduled tasks on the server? That's the only way to really reset the value at a specific time. You could do it in PHP by resetting the value when a specific page is loaded, but you'd be checking for a specific time, and someone would have to run the script at that time.
-
I won't provide you with an example, because I don't have a real simple one, but I'll give you a few tips. 1) Keep in mind that only the checked boxes will be sent on to the processing page. This gives you the option of setting the value to the client id and you do the same action to all the values that are submitted. 2) You can name the checkboxes in 1 of 2 ways. Use an array (ie. ckClientID[]) or you can simply name them with a similar naming convention (ie. ck1234, where 1234 is the client id), so when you submit the form, you loop through all the results and look for variables that start with "ck" and handle them accordingly.
-
How to save mysql link resources in the session variable?
ober replied to deoac's topic in PHP Coding Help
I'm not quite clear on why you would want to re-use the same resource. It's not going to contain the same recordset if that's what you're trying to do. Besides, you have to reconnect to the database on the new page, so it can't re-use the same identifier. -
I know you're more experienced than this. You can't echo inside an echo. You have to concatenate variables if you're going to escape the echo. You should avoid using short tags if possible. And you certainly wouldn't have to echo all of that. [code]<?php if($not_play_out_date == "no") { extract($row); ?> <form method="post" action="update_promotor_info.php"> <select name="dates1"> <option value="<?=$dates1?>"><?=$dates1?></option> </select> <select name="dates2"> <option value="<?=$dates2?>"><?=$dates2?></option> </select> <select name="dates3"> <option value="<?=$dates3?>"><?=$dates3?></option> </select> <select name="dates4"> <option value="<?=$dates4?>"><?=$dates4?></option> </select> <?php } ?>[/code] You didn't even spell "name" right in one of the select elements. Also, can I ask why you only have 1 option in 4 different select boxes?? If that's going to stay the way it is, you can loop it to create them instead of repeating the same information and only changing a number.
-
You'll have to setup an if statement that verifies that something is in both, because you'll only want to put the ones with values in them in the WHERE clause. pseudo-code: if something in namebox and descriptionbox $query .= WHERE name LIKE namebox OR description LIKE descriptionbox elseif something in namebox and nothing in descriptionbox $query .= WHERE name LIKE namebox etc. You may want to give them the option to search with an OR or an AND if they specify both.
-
Problems with sending page by mail using Internet Explorer
ober replied to GarethMarijt's topic in PHP Coding Help
That's a rough one. When you get to the point when you're processing the email, can you echo the $_SESSION contents? Are you sure the session contents are even being carried over to the next page? Also, have you considered using cookies to take the session issues out of the equation? -
That will work... have you tried it?
-
Your problem doesn't have anything to do with PHP. This is a strictly HTML coding issue. The names of all your radio buttons have spaces in them and you don't have quotes around them. You shouldn't have spaces in the names of elements like radio buttons. And you should definately have quotes around that attribute. And as far as the drop-downs, you don't have have a name for the select boxes, so how do you expect to refer to those values??