Jump to content

BluwAngel

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by BluwAngel

  1. when you click on profile -> my content it would be great to see what posts are solved like we can do that under normal forum section adding that green SOLVED would be nice to have
  2. ye i know but back 3-4 years ago there was prediction that zend will e huge, and today its on top but its slightly going down these days, event zend2 cant keep them on top, so is it good idea to invest time in what is good now or look for something that will be big in future? since i used to write php from scratch
  3. hi im wondering where do you see future of web in general, is internet currently at its highlight(except audio search etc but that is progressing too) what can happen in 5-10 years - will we have more developers then its needed and what backend development do you recommend as future investment (for web) zend, MVC, MVVM, codeigniter, coding in clear php code or maybe something else few years ago people talked alot about zend and it is now successful but zend2 is out and its not going good way as i can see - what in your opinion is "next new thing"
  4. hi i have some page where i write numbers and its stores them in database, but it would be great not to press tab (or click on that field) every time, how do i create when its loaded that i can just type in like google have when page is loaded
  5. so i have field for email <input id="email" name="email" type="email" /><br /> is there and HTML command to prevent it from leaving blank (if you type "test" it will say its not email. any way to do that if some leave it blank?) i created filter with JS, but i want same that bubble box where it say "please enter email or something like that
  6. Allow right click extension blocked my JS from running problem solved
  7. i started to do some simple javascripts and i created document.onclick = function(){ alert("Hello"); } but problem is i run it from loacalhost, when i run that from IE or FFX it works, but it wont work on chrome how do i fix that?
  8. im wondering is there any easy way to echo server time and local time... without converting them from unix to timestamp i have found thi code, but i cant tell is it server or local echo date("H:i" ,time());
  9. oh i erased that and totaly forgot about it... thanks, solved
  10. it did solve my problem, but it still gets only 1 result - its calendar, it generate numbers(days) ok, but somehow it fails to put that class on field i want to on event_date i have dates 28.03.2012 30.03.2012 and it only put at 30.03.2012.
  11. Warning: mysql_fetch_array() expects parameter 1 to be resource, string given... im tryin to put class inside code if $dayNumber and $dan are equal i tried few ways but all are complicated since i have to call some functions this end up as "simple" solution but i dont know where did i get wrong PS that should be possible? else { echo "<td width='40'"; $moj_id = $_SESSION['id']; $query_event = mysql_query("SELECT * FROM events WHERE id_user='$moj_id' GROUP BY 'event_date'") ; $test = mysql_fetch_array('$query_event'); $date_event = $test['event_date']; sscanf($date_event, "%d-%d-%d", $godina, $mjesec, $dan); if ($dan==$dayNumber && $mjesec==$month && godina==$year) { echo " class='radni'"; } echo"><a href='day_info.php?dan=",$dayNumber,"&mj=",$month,"&gd=",$year,"'>" . $dayNumber . " </a></td>\n"; $dayNumber++; }
  12. you are right Dan it works now... such terrible simple mistake thanks
  13. hm... if i use just echo $_POST['id_zamjena']; it will just say array as output how do i extract same number i stored so i can use it again? if i use id_zamjena[0] i will always get 15, dosnt matter wich button do i press
  14. i tried both with and without same problem
  15. okay i have table named ZAMJENE with 2 rows only row that i need to setup is named id_zamjena and have values 15 and 16 when i do echo on page it work great but when i press button i get only 16 for both entries full cde is too long so i paste only important parts $query_zamjene = mysql_query ("SELECT * FROM zamjene WHERE id_user_1='$moj_id' AND zamjenjeno='0' ORDER BY id_event_1"); echo "<form method='post' action='event_zamjenjen.php'>"; while ($rows = mysql_fetch_array($query_zamjene)) { $id_zamjena = $rows['id_zamjena']; $id_event_1 = $rows['id_event_1']; $id_event_2 = $rows['id_event_2']; $id_user_2 = $rows['id_user_2']; echo "$id_zamjena"; // THIS ROW WORKS CORRECTLY echo "<input name='id_zamjena' type='hidden' value=$id_zamjena>"; // output of this is always 16 echo "<input name='response' type='submit' value='Prihvati zamjenu' /> <input name='response' type='submit' value='Odbaci zamjenu' /> <br>"; } echo"</form>";
  16. this other one works great, thanks a lot
  17. i created 2 buttons and how do i pass value of one i click on so i have yes and no button do i need 2 different forms or 1 with different values? any tip, tutorial or code will help
  18. nwm triple while loop and some new querys works
  19. here are screenshots from tables and joinend 2 tables (ZAMJENA and EVENTS)
  20. tried that before... for example in table ZAMJENA i have 1 rown and on EVENTS have 20 rows he fills data under id_event_1 and id_event_2 randomly (and i cant afford that) so far code is this <?php session_start(); include "check.php"; include "db_connect.php"; //spojit na tablicu pogledat da li postoje termini za zamjenu $moj_id = $_SESSION['id']; $query_zamjene = mysql_query ("SELECT * FROM zamjene JOIN users ON id_user_2=id WHERE id_user_1='$moj_id'"); //broj zamjena $br_zamjena = mysql_num_rows($query_zamjene); if ($br_zamjena >0){ echo "Imate $br_zamjena mogućih zamjena <ul>"; while($rows = mysql_fetch_array($query_zamjene)) { $id_zamjena = $rows['id_zamjena']; $id_event_1 = $rows['id_event_1']; $id_event_2 = $rows['id_event_2']; $id_user_2 = $rows['id_user_2']; $ime_2 = $rows['ime']; $prezime_2 = $rows['prezime']; echo "<li>Vaš event $id_event_1 zamjenite sa $id_event_2, zamjenu je tražio $ime_2 $prezime_2 </li>"; //english your event $id_event_1 can be changed with $id_event_2, requested by $ime_2 $prezime_2 } } else echo "Nemate zahtjeva za zamjenu"; // no requests for change ?> here i work with 3 tables EVENTS ZAMJENE USER i mange to get name from USER table but i dont know that part with event
  21. this is the problem i have 2 tables table named ZAMJENE with fields id_event_1, id_event_2 table named EVENTS with fields id_event and event_date and i need echo $id_event_1 on date(EXTRACT FROM TABLE EVENTS FIELD event_date) can be replaced with $id_event_2 on date(EXTRACT FROM TABLE EVENTS FIELD event_date) structure must remains because i have half site build already and i have 3rd table where i just need use JOIN hope you understand problem
  22. is there an addon for notepad++ to quick create talbe, link and basics (just like dreamweaver has under insert window)
  23. i have problem i have file where i set 2 times (starts and ends) and i set example from 8:00 to 20:00 all combinations works except starting from 8:00 if i set 8:01 it works but cant find out problem help or idea? (time to 20:00 will work ) <?php session_start(); include '../db_connect.php.'; $title = $_POST['title']; $detail = $_POST['detail']; $event_date = $_POST['event_date']; $id_user = $_POST['id_user']; $smjena_od_h = $_POST['smjena_od_h']; $smjena_od_min = $_POST['smjena_od_min']; $smjena_do_h = $_POST['smjena_do_h']; $smjena_do_min = $_POST['smjena_do_min']; $vrijeme_od = "$smjena_od_h:$smjena_od_min"; $vrijeme_do = "$smjena_do_h:$smjena_do_min"; function timeDiff($firstTime,$lastTime) { $firstTime=strtotime($firstTime); $lastTime=strtotime($lastTime); $timeDiff=$lastTime-$firstTime; return $timeDiff; } // converts to hours $radnih_sati=timeDiff(" $vrijeme_od","$vrijeme_do")/60/60; //check with other table $query_settings = mysql_query("SELECT * FROM settings"); $vrijeme = mysql_fetch_array($query_settings); $od_settings = $vrijeme['rv_otvoreno']; $do_settings = $vrijeme['rv_zatvoreno']; $sati_settings = $vrijeme['min_rv']; if ($vrijeme_od<$od_settings or $vrijeme_do>$do_settings or $radnih_sati<$sati_settings){ echo "Pogrešno uneseni podaci!"; } else{ //data entry $insert_event = 'INSERT INTO events ( title, detail, event_date, id_user, vrijeme_od, vrijeme_do, radnih_sati) VALUES ("'.$title.'", "'.$detail.'","'.$event_date.'", "'.$id_user.'", "'.$vrijeme_od.'", "'.$vrijeme_do.'", "'.$radnih_sati.'")'; mysql_query($insert_event); echo "podaci uspješno pohranjeni."; }
  24. nah, type mistake it works -.- i check and fail check.. then i rewrote and it worked blind me
  25. okay i need help with this part of code i need to set time 00:00 to 24:00 $vrijeme_otvoreno = "$rv_od_h:$rv_od_min"; $vrijeme_zatvoreno = "$rv_do_h:$rv_do_min"; if ($vrijeme_otvoreno =="00:00" && $vrijeme_zatvoreno == "00:00") { $vrijme_zatvoreno = "24:00"; echo $vrijeme_zatvoreno; } echo "$vrijeme_otvoreno - $vrijeme_zatvoreno <br>"; i get echo 00:00 - 00:00 and i need it to be 00:00 - 24:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.