![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
if you tried that before and it didnt work then you didnt use it correctly...do you have code that shows how you used it?
-
try this
$id = $_GET['id']; $qP2 = "SELECT * FROM model_in_city WHERE city_display = 1 AND model_id = '$id' "; $rsP2 = mysql_query($qP2); $row2 = mysql_fetch_assoc($rsP2); $city_1 = $row2['example_field']
-
you will want to store their information in a database
-
sounds like you would want to use ajax
-
okay so now you know your problem...i've had issues in the past with default values in tables not appearing...you can change the field to a varchar and manually enter in a 0. but other than that im not sure what causes that to happen
-
1. have you tried echoing the value of $row['champion_id']?
2. what actually happens when the value is 0?
3. are you inserting the contender_id into your db as 0 or blank?
-
if you require that all three to be set, then you would use
if ($rsUpdate1 && $rsUpdate2 && $rsUpdate3) { echo "Update successful."; }
else you can use
[code]if ($rsUpdate1 || $rsUpdate2 || $rsUpdate3) { echo "Update successful."; }
[/code]
-
variable scope is involved here. since you declare both $update and $rsUpdate outside of any statements...when you declare them again in your if statements you are writing over them....the best practice would be to change the variables like you have in your initial question text
-
sounds like you'll want to be using a combination of php and mysql...i would start at php.net
-
To learn PHP is not easy. Being a member of such forum will help you to lead in the PHP. Let's enjoy!
welcome to you too!
-
welcome to phpf!
-
welcome to the forums! you'll learn alot here
-
Figured it out, for 1 thing, had the stuff backwards, and second should have used !empty instead of isset:
$eventstart = $rown['starttime']; if(!empty($eventstart)) { echo $rown['starttime']; } else { echo "All Day"; }
normally i only use isset() for checking if a submit button has been pressed...it only really checks if the variable exists..not if it contains data
-
I found a better(?) way to get what I want. Thank God for jquery
In team.php's head-tag there's:
<script type="text/javascript" src="includes/jquery-1.6.1.min.js"></script>
<script type="text/javascript" language="javascript">
function loadContent(elementSelector, sourceURL) {
$(""+elementSelector+"").load(""+sourceURL+"");
}
</script>
and in the player selection menu there's:
<a href="#" onclick="loadContent('#content', 'team_players.php?id=player1.xml')">
where the xml filename varies. The whole content of the page is in the team_players.php where I'm supposed to import the xml's data into tables etc.
After some initial testing I'm pretty sure I will be asking for help in a few days on the "import data from xml to tables"-issue... I'll try to figure it out myself first and if I can't manage --> I'll be back.
BTW. Which is better (and why?)
1) <a href="#" onclick="loadContent('#content', 'team_players.php?id=player1.xml')">
or
2) <a href="javascript:loadContent('#content', 'team_players.php?id=player1.xml');"> ?
I prefer using the second...just two seperate ways of doing it
-
what are your results
-
welcome to phpf, im sure we will be able to help you along the way!
-
good to have your knowledge here...welcome
-
that could be onne way of doping it. you can also look into using curl to grab data from a url
-
well that was simple
thanks
no problem, mark as solved please,
-
yes
-
your div syntax is correct..but why cant you simply move your ajax to the body tag
-
you might be looking for set_time_limit() function
-
Thankyou
-
it might be something as simple as in your li tags
<li><a href="register.php"class="current">Register</a></li>
you need a space between the href closing quotation and you class...e.g
<li><a href="register.php" class="current">Register</a></li>
grab form value before submission
in PHP Coding Help
Posted
what do you mean?