Jump to content

martin.kahil

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About martin.kahil

  • Rank
    Newbie
  1. Hi everyone. need some help again.I have a code that generates some links, and I want the user to click that link and that information will be posted... I have tried this with javascript <script>function send(day){document.getElementById('day').value=day;//some code that lets the button be clicked}</script><br /><br /><br /><br /><br /><form method="post" action="ShowSalry.php"><input type="hidden" name="day"><input type="submit" visiable="false"></form><a OnClick="send(4)">click 4"</a> The problem is that I don't
  2. martin.kahil

    Objects

    OK, I'll check it. but what do you mean with "a . level system"??
  3. Ahhh.. I think i get it.. you simply "cut" parts of the string.. well I'll need to modify it, becaue I get the date like this "2007-11-17" so I need the function function datetime($syntax,$datetime) { $year = substr($datetime,0,4); $month = substr($datetime,5,2); $day = substr($datetime,8,2); return date($syntax,mktime(0,0,0,$month,$day,$year));}/// and callecho datetime("d",$row['date']); right?
  4. martin.kahil

    Objects

    So I can't use objects in PHP?
  5. You mean like this? while($row = mysql_fetch_array($result)) { $date[$count]=datetime($row['date']); } And what is the $syntax?
  6. martin.kahil

    Objects

    Does not work. Thats the code <html><body><?php$O=new Object();$O.d="e";echo $O.d;?></body></html> And that the error I get
  7. If I have a field in the MySQL database with contains a date. And I import it to a PHP variable like this $con = mysql_connect("localhost","","");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("db", $con);$result = mysql_query("select * from table");while($row = mysql_fetch_array($result)) { $date[$count]=$row['date']; } How do I get the day? For example if the date id 2007-11-18, I need the 18, How do I do this?
  8. martin.kahil

    Objects

    Hi again, now i need to create some objects for my calennder.. I mean that I have 3 values for every date (at least) in my database. And I want to import it to the page, so I want to refer to it like thisObj.dateObj.value1Obj.value2How do I create something like this? And can I create an array of these?
  9. Well your own topics you can find if you click on you username on the left upper part of the page. Where it says "Logged in as: martin.kahil ( Log Out )" simply click your username and you get your profile and your topics are right in the center!But I still think that a search option will be usefull...
  10. Hi, i'm working on some kind of calender, and use a database connected with it. Anyway i need to search in a table acording to dates. but i allways get an error. SELECT * FROM `table` WHERE date=>'2007-11-18' for the record "date='2007-11-18'" works!
  11. Is there a way to search something in the forum?like in the SQL forum for the word "date" to find related links, and may save opening a new topic on the same question?
  12. Ingolme for your information, and everybody else:In the function mktime you write first the month then the day and in the end the year!witch means that it has to be like this: mktime(0,0,0,$month,1,$year);//this is rightmktime(0,0,0,1,$month,$year);//this is wrong! A litle difrence, but can drive you crazy untill you find it...
  13. Thanks.. I figured out the $year thing alone.. but my question was someing else.. I want to to know if there is something in the function header that declares that its a function that returns a value or not...Like in Visual Basic Function days_in_month(month int, year int) int the last "int" says that its a function that returns an intenger. Is there something like it in PHP?
×
×
  • Create New...