callesson
-
Posts
53 -
Joined
-
Last visited
Never
Posts posted by callesson
-
-
Hello
I would like a Modal window, something like this
to popup when someone on my website gets an error. For exampel "Wrong username" Then I want the Modal window to display "Wrong..."
Im checking for errors with php, and if wrong username is true, then I want the window.
I have no idea how to make one, so if someone knows a tutorial or something then your welcome
-
Okey okey!
Ty guys! Sry if I was unclear in the beggining but I was at work and I was tired But Thx!
-
Siric:
I do not have my code right here, but its as simply as this ( Do not correct this code)
<form ... method="post"> ... <input type="submit" name="submit"/> ...
... if(isset($_POST['submit'])) { $time = date() + 10 min; $up = mysql_query("UPDATE table SET time=$time where user=$_SESSION..."); } then next time: $select = mysql_query("SELECT * FROM table where user=$_SESSION..."); $time = $row[time]; $date = date(); if(isset($_POST['submit']) && $date < $time) { echo "You cant do this now... Time left x"; }
theocas:
Well, I could check on that. But i havent worked with cookies before.
-
Sry for that. No dont want you to do it for me xD
Well im stuck at the
Calculating, and Checking so its the right day.
Right now Im adding a time into the Database (Date() + 10 or 30 min) when the submit is set, then next time its set it will check if date() is > then Database time.
And for the second thing, I just want an idea. Cause I have no idea how to do it.
-
Sure thing, I just wanted help to be confirmed first Maybe nobody wanna help me haha. But okey lets explain.
First Thing:
I have a submit button that will rederict you to another page. If that submit is set then your not gonna be able to use it again after like 10 or 30 min. So I would like to check that, and without problems with like if its another day or something. Also I would like to calculate the time thats left so I could display it.
__
Sec Thing:
I want something to update every hour. Like for each hour update something +10. I would like it to check like this.
If you logout, and then you login after 2 h you will get 20 of something. And also if you are loged in it will update. But if there is another way, feel glad to tell
__
Ty!
-
Hey Guys! or Chicks!
I wanna work with php and Time but im not good at it, so I wonder if there is someone out there who could help me ?
Ty!
-
maybe:
function myFunction(){
doSomething();
wait(500);
doSomethingElse();
}
-
-
Nmv, think i got it
Ty m8 !
-
Hello Everyone!
I would like some help with php, sql and a text input.
Is there a way to get 3 values from one textbox?
Like if I have a textbox were i write
" .gold 100 Admin "
So example :
$firstword = gold $sec = 100 $third = Admin and then a sqlupdate ("UPDATE $firstword=$firstword +$sec WHERE user=$third");
And I only want it to be one textbox.
Ty in advance!
-
I tryed to use the <?echo$something?> and nothing happend, then i typed <?php echo$something?> and it responded.
I dont know it will help, but try add "php" ;<?php;
EDIT
Also i see that your missing equal sign =
value="<?php
Not Value"<?
-
Np, I havent been online so much lately either
Glad I could help, good luck in the future!
-
Well... If you want to display the info so.
<?php $conn = mysql_connect(HOST,USER,PASS); $db = mysql_select_db("*******") or die( "Unable to select database"); if(isset($_GET["id"])) { $gethotel= mysql_query ("SELECT * FROM hoteltable WHERE id='$_GET[id]'") or die(mysql_error()); $count = mysql_num_rows($gethotel); if($count == 1) { $row = mysql_fetch_assoc($gethotel); { $hotelname= $row['link_text']; $address = $row['address ']; $telephone= $row['telephone']; echo "<strong> $hotelname </strong><br /> $address : $telephone <br /><br />"; } } elseif($count==0) { echo "There is no hotel with that name found!"; } } else { echo "There is no hotel found!"; } ?>
-
Np
Haha, we will be waiting!xD
-
Wouldn't this work ?
echo "<a href='show_hotel.php?id=$list[link_text] '><strong>" . $list['link_text'] . "</strong></a>" . " <br />" . $list['address'] . " | " . $list['telephone'] ."<br /><br />"; }
-
Ty it did work
But is there a way to make the text echo out info from the link name.
Like if I hover Calle then SELECT * FROM table WHERE name=Calle then echo out info ?
__
No worries i found out my self
-
Okey, I will.
thanks mate
-
Hello guys!
First off Im not sure this is javascript but I'll post it here.
I was wondering if you guys knew how to make one of these?
check img - http://www.geting.se/viewimage.php?image=238842-hover.JPG
Its a little box with info about your sword when you hover the sword.
Thx in advance
-
Remove one " ; " ?
$result = mysql_query("SELECT * FROM music WHERE userId = 'test'") or die(mysql_error());;
-
Add a colum with name Size and if the size is 3XL insert 7 to the Size colum. 2XL=6, XL=5, L=4,M=3,S=2,XS=1
Then just ORDER BY Size Desc or what is it.. Simple way to make it
-
Nice, Thx Teddy And thx Andy.
I maybe gonna start coding more beautiful ^^ Like you did teddy haha
-
Yea it kinda is haha^^.(Btw, im not even sure i need the hidden thing, lol)
Here is my Form
echo "<form action='gear.php' method='post'>"; echo "Head - <a href=\"items.php?sida=$Head\">".$Head."</a> <input type='submit' name='Unequip1' value='UnEquip'/><input type='text' name='hidden1' value='$Head'/>"; echo "<br>Shoulders - <a href=\"items.php?sida=$Shoulders\">".$Shoulders."</a> <input type='submit' name='Unequip2' value='UnEquip'/><input type='text' name='hidden2' value='$Shoulders'/>"; echo "<br>Chest - <a href=\"inventory.php?sida=$chest\">".$chest."</a> <input type='submit' name='Unequip3' value='UnEquip'/><input type='text' name='hidden3' value='$chest'/>"; echo "<br>Hands - <a href=\"inventory.php?sida=$Hands\">".$Hands."</a> <input type='submit' name='Unequip4' value='UnEquip'/><input type='text' name='hidden4' value='$Hands'/>"; echo "<br>Legs - <a href=\"inventory.php?sida=$Legs\">".$Legs."</a> <input type='submit' name='Unequip5' value='UnEquip'/><input type='text' name='hidden5' value='$Legs'/>"; echo "<br>Shoes - <a href=\"inventory.php?sida=$Shoes\">".$Shoes."</a> <input type='submit' name='Unequip6' value='UnEquip'/><input type='text' name='hidden6' value='$Shoes'/>"; echo "<br>Weapon - <a href=\"inventory.php?sida=$weapon\">".$weapon."</a> <input type='submit' name='Unequip7' value='UnEquip'/><input type='text' name='hidden7' value='$weapon'/>"; echo "</form>"; }
The Unequip Code, Only the thirst submit, Unequip1.
if(isset($_POST['Unequip1'])) { $query = mysql_query("SELECT * FROM inventory WHERE user='$_SESSION[myusername]'"); while($row = mysql_fetch_array($query)) { $Full1 = $row['Full1']; $Full2 = $row['Full2']; $Full3 = $row['Full3']; $name_id = $_POST['hidden1']; $query = mysql_query("SELECT * FROM chars WHERE user='$_SESSION[myusername]'"); while($row = mysql_fetch_array($query)) { $fetchitem = mysql_query("SELECT * FROM items WHERE item_name='$name_id'"); while($row = mysql_fetch_array($fetchitem)) { $name = $row['item_name']; $class = $row['class']; $item_armor = $row['item_armor']; $item_strength = $row['item_strength']; $item_aglillity = $row['item_agillity']; $item_intellect = $row['item_intellect']; $item_dmg = $row['item_dmg']; $item_dmgmax = $row['item_dmgmax']; $item_stamina = $row['item_stamina']; $stam_10 = $item_stamina * 10; $int_10 = $item_intellect * 10; if($Full1 == 0) { $update1=mysql_query("UPDATE inventory SET Slot1='$name', Full1=1 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:gear.php"); } elseif($Full2 == 0) { $update1=mysql_query("UPDATE inventory SET Slot2='$name', Full2=2 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:gear.php"); } elseif($Full3 == 0) { $update1=mysql_query("UPDATE inventory SET Slot3='$name', Full3=3 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:gear.php"); } elseif($Full1 != 0 && $Full2 != 0 && $Full3 != 0) { header("Location:inventoryfull.php"); } $select = mysql_query("SELECT * FROM bankslot2 WHERE user='$_SESSION[myusername]'"); $count=mysql_num_rows($select); { $fetchitem = mysql_query("SELECT * FROM bankslot2 WHERE User='$_SESSION[myusername]'"); while($row = mysql_fetch_array($fetchitem)) { $slot1 = $row['Full1']; $slot2 = $row['Full2']; if($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot1==0) { $update5=mysql_query("UPDATE Bankslot2 SET Bankslot1='$name', Full1=1 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:bank.php"); } elseif($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot2==0) { $update5=mysql_query("UPDATE Bankslot2 SET Bankslot2='$name', Full2=2 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:bank.php"); } elseif($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot2==2 && $slot1==1) { header("Location:bankslotisfull.php"); } } } //Bankslot4 ----------------------------* $select = mysql_query("SELECT * FROM bankslot4 WHERE user='$_SESSION[myusername]'"); $count=mysql_num_rows($select); { $fetchitem = mysql_query("SELECT * FROM bankslot4 WHERE User='$_SESSION[myusername]'"); while($row = mysql_fetch_array($fetchitem)) { $slot1 = $row['Full1']; $slot2 = $row['Full2']; $slot3 = $row['Full3']; $slot4 = $row['Full4']; if($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot1==0) { $update5=mysql_query("UPDATE Bankslot4 SET Bankslot1='$name', Full1=1 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:bank.php"); } elseif($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot2==0) { $update5=mysql_query("UPDATE Bankslot4 SET Bankslot2='$name', Full2=2 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:bank.php"); } elseif($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot3==0) { $update5=mysql_query("UPDATE Bankslot4 SET Bankslot3='$name', Full3=3 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:bank.php"); } elseif($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot4==0) { $update5=mysql_query("UPDATE Bankslot4 SET Bankslot4='$name', Full4=4 WHERE user='$_SESSION[myusername]'"); $update2=mysql_query("UPDATE chars SET $class='Nothing' WHERE User='$_SESSION[myusername]'"); $update3=mysql_query("UPDATE chars SET Hpmax=Hpmax -$stam_10, Mpmax=Mpmax -$int_10, Stamina=Stamina -$item_stamina, Damagemax=Damagemax -$item_dmgmax, Damage=Damage -$item_dmg, armor=armor -$item_armor, intellect=intellect -$item_intellect, agility=agility -$item_aglillity, strength=strength -$item_strength WHERE User='$_SESSION[myusername]'"); header("Location:bank.php"); } elseif($Full1 == 1 && $Full2==2 && $Full3==3 && $count==1 && $slot2==2 && $slot1==1 && $slot3==3 && $slot4==4) { header("Location:bankslotisfull.php"); } } } } } } } Then comes Unequip2, then 3. ..
-
Hey guys
(RP Game)
I would like my code to be very very less than it is. Right now I have my gear page were i have Head, Weapon, Chest etc... Foreach gear slot I have a button and a hidden form. If I press Un-eqiup on Head the code will check for the hidden value that is equal to my head, and the head will be un-equiped. I have 7 Slots and thats 7 codes that are the same, only an unique hidden.
Is there another way to do it?
Tell me if you want to see the code!
-
Ty !
Photo Slideshow, Smode/fade
in Javascript Help
Posted
Hello there!
Im new with javascript and im having this script that i got from school. And im trying to modify it a little bit. I have added a js script so the slideshow starts by it self. It works fine, but I want the pictures to like fade in, like smode. So it doesn't just change photo all quick.
Here is the code
Code from school.
Self start.