-
Posts
2,527 -
Joined
-
Last visited
Everything posted by DeanWhitehouse
-
Without seeing the whole code we can't really help
-
Yeah maybe put it in a loop?
-
I added some to point out some bugs to you http://keurmerk.coldcharlie.nl/multi.php
-
Thanks for your thoughts i will pass them onto the designer. The css thing (which also affects the validation) is due to the fact that making CSS which is browser friendly (for most browsers) and resolution friendly (for most resolutions) is a lot harder than using tables. But i would prefer CSS so we can implement multiple styles.
-
[SOLVED] My Code Won't UPDATE the Database -- NEEDED ASAP
DeanWhitehouse replied to skiingguru1611's topic in PHP Coding Help
This should show any errors <?php error_reporting(E_ALL); ini_set("display_errors",true); mysql_connect(localhost,$username,$password) or die("Cannot connect to db ".mysql_error()); mysql_select_db($database) or die("Cannot find DB ".mysql_error()); $query = "UPDATE registration SET playerfirst = '$playerfirst', playerlast = '$playerlast', playeraddress = '$playeraddress', playercity = '$playercity', playerstate = '$playerstate', playerzipcode = '$playerzipcode', guardianphone = '$homephone', guardiancell = '$cellphone', playeremail = '$playeremail', playerage = '$playerage', playerweight = '$playerweight', playerheight = '$playerheight', playergrade = '$playergrade', playerposition = '$playerposition', playerschool'$playerschool', playerlevel = '$playerlevel', playercoach = '$playercoach', playercountry = '$playercountry', roommate = '$roommate', guardianwork = '$workphone', guardianfirst = '$guardianfirst', guardianlast = '$guardianlast', guardianemail = '$guardianemail', emergencyfirst = '$emergencyfirst', emergencylast = '$emergencylast', emergencyhome = '$emergencyhomephone', emergencycell = '$emergencycellphone', emergencyemail = '$emergencyemail' WHERE user = '$user'"; mysql_query($query) or die("Cannot run query ".mysql_error()); mysql_close(); ?> -
[SOLVED] My Code Won't UPDATE the Database -- NEEDED ASAP
DeanWhitehouse replied to skiingguru1611's topic in PHP Coding Help
Remove the @ symbol, and add die statements to the connect and the query. And please don't put NEEDED ASAP in the title, we are doing this for free and no ones script is more important than the rest -
Wow that made no sense at all
-
passing session data between scripts w/o refresh page
DeanWhitehouse replied to koolaid's topic in PHP Coding Help
Sessions and variables are not the same This is where you define the session $_SESSION['theresumename'] = $nizame; But with this code if ( !($_SESSION['theresumename'] === $nizame) ) $_SESSION['theresumename'] = $nizame; You might be overwriting the session with something new, check all your variables are what you think -
I get an error trying to access that
-
passing session data between scripts w/o refresh page
DeanWhitehouse replied to koolaid's topic in PHP Coding Help
I don't mean the session isn't defined i mean the variable called $theresumename isn't defined. Look at the bottom of your 2nd script if ( !($_SESSION['theresumename'] === $theresumename) ) $_SESSION['theresumename'] = $theresumename; What is it comparing against :S -
passing session data between scripts w/o refresh page
DeanWhitehouse replied to koolaid's topic in PHP Coding Help
It isn't set on any of them pages -
Change var to public (the equivalent), read up on some php 5 OOP tutorials
-
When reading up on some security measures i read about using environment variables for storing the database connection info (password, username etc.). But it said they are printed in PHP info, so it is a safe measure for storing the db stuff or is their a better way?
-
All of your $this -> $varName should be $this -> varName Without the $ sign
-
If i understand correct, then like <?php $i = 5; while($i <= 50) { if($i == $limit) $s = "SELECTED"; else $s = ""; echo '<option value="' . $i . '" ' . $s . '>' . $i . '</option>'; $i += 5; } ?> Edit ignore that is it practically the same as you have, what function is passing limit? and try echoing limit within the loop to see if it is correct
-
Not sure if it will help but trying echoing the status and the domain name in the loop to check them. Do they look correct?
-
It makes helping you easier if you use code tags then we can read the code easier
-
passing session data between scripts w/o refresh page
DeanWhitehouse replied to koolaid's topic in PHP Coding Help
Where is $theresumename set? -
What do you mean replace the limit everytime, do you mean restart the count or change the current url? if the latter then do echo '<a style="display: inline block; padding: 5px;" href="http://' . $_SERVER['HTTP_HOST'].'/?limit=' . $i . '">' . $i . '</a>'; Without more info about the url, i can't help much more
-
dunno if it will work but <?php $file = file_get_contents("Settings.conf"); $file = nl2br($file); echo $file; ?>
-
Or something to with the values in the db, have they changed?
-
Maybe use ini_get() http://uk.php.net/ini_get To find out if it is in the php.ini file Even better http://uk.php.net/ini_get_all
-
round()? That might not work, as it is all designed to work with decimals mainly. Maybe look through http://www.unitedscripters.com/index.html?file=/phps/manual3.html&ref=google%20php%20manual%20number%20functions