Chevy
Members-
Posts
167 -
Joined
-
Last visited
Never
Everything posted by Chevy
-
Ah, okay, ill give that a try Edit: I have also tried echo-ing the data, it all is what it is supposed to be, yet it will not update.
-
They all are numerical values, if that is what you mean.
-
I do not get anything when I do that :?
-
For some reason none of my data in MySQL is updating. Is there something wrong with this code? $plusone = $info['attempts']+1; $updatea = mysql_query("UPDATE `accounts` SET `attempts`='$plusone' WHERE `username`='$username'"); $owed = (10*$info['attempts'])+20; $newpoints = $info['points']-$owed; if ($newpoints < "0"){ $newpoints = 0; } $updateb = mysql_query("UPDATE `accounts` SET `points`='$newpoints' WHERE `username`='$username'");
-
Ah, I checked my other table it might be a problem there, hold on :-P -Edit- Yea it was the other table. Thanks for the help
-
Array ( [0] => gold [1] => feautured [2] => friendliest ) This doesn't make since, they are all there..?
-
$trophies = explode(",", $site_array[trophies]); echo '<center><br><font size="4"><b><u>Trophies</u></b></font><br><table width="250><tr>'; if ($site_array['trophies'] == NULL){ echo '<td align="center"><font color="red"><b>'.$site_array['name'].' has no trophies!</b></font></td>'; } $i = 0; foreach($trophies as $trophy){ $trophy_select = mysql_query("SELECT * FROM `trophies` WHERE `shortname`='$trophy'"); $trophy_array = mysql_fetch_array($trophy_select); $i = $i+1; echo '<td align="center"><img src="'.$trophy_array['image'].'"><br><b>'.$trophy_array['name'].'</b></td>'; if ($i == "2"){ echo '</tr><tr>'; $i = 0; } } That code only puts out one thing when I have 3 in the database field My DB for that one site looks like this... gold,feautured,friendliest It only is displaying Gold
-
I never said it would fix it, I was just wondering if there was an error in the MySQL
-
put this after the mysql_query and see what it says: or die(mysql_error());
-
Posting Multiple Variables to $_POST using HTML Forms
Chevy replied to vajra_hendry's topic in PHP Coding Help
$duration = $_POST['duration']; $banner = $_POST['banner']; I think that is what you mean -
Well I am making a text based music play and I don't know if it will be possible, because I want people on myspace to be able to put it in there profiles. I tried iFrames, they do not work for myspace. Same with object. Is this even possible? With Myspace? my iFrame code: <iframe src ="muspec.net/player?user=Kolard" width="100%"> </iframe>
-
Sorry I have solved this
-
How can I get my timestamp to output to a date Example: $time = time(); $date = date("F jS, Y"); How would I get the $time to turn into the $date?
-
How would I go about doing that?
-
Is it possible to reverse the strtolower function? Here is my code. foreach($filout as $replace){ $badwords = eregi_replace($filout,$nobadwords,strtolower($badwords)); } and yes, I need to str it to lower to check the bad words haha
-
Is it possible to get the URL that the form submitted on? For security reasons a user could make a form off site and link it to that page, and do some bad stuff Is it possible to get the URL where the form came from? (Without putting it as a field in the form itself?)
-
http://www.fightforone.com/ Go there and you can see my problem I need the text in the white spot, but the margin is not working?
-
Yes, thank you! I thought it was possible xP
-
I am still having an EXTREAMLY hard time doing this... Starting to think it is impossible This is what I want it to do Display a link to go to the next song which if the current song was song1 then it would got to song2 unless it did not exist then it would got to song3 unless that didnt exist then it would go to song4, ect all the way to song10 and then die.
-
Turning a url or email into a link automatically
Chevy replied to alexcmm's topic in PHP Coding Help
<?php if (isset($_POST['link'])){ echo '<a href="'.$_POST['url'].'">'.$_POST['url'].'</a>'; } echo '<form action="" method="POST"> Link URL: <input type="text" name="url"> <input type="submit" name="link" value="Create Link"> </form>'; ?> Is that what you are talking about? -
Hm. I guess I am not familiar with those at all...The code I posted last works fine echoing the songs that have a URL in them, but I want to know how I can get the first one and the next one.
-
$songs = array("song1", "song2", "song3", "song4", "song5", "song6", "song7", "song8", "song9", "song10"); foreach ($songs as $song){ if ($userarray[$song] != NULL && $userarray[$song] != "URL Of Song"){ echo $song; } } I think that is part of it, now I just need it to grab the first element of the array and the next I tried using current($song) and next($song) but they are not in the arrya form anymore :-/ this is really confusing to me.
-
Nah that would not work since the songs are not stored in a whole separate table, they are off site links.
-
Anyone else want to take a shot at this? It is giving me a headache haha