Jump to content

jhecht

Members
  • Content Count

    608
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jhecht

  • Rank
    Nachos
  • Birthday 05/10/1990

Previous Fields

  • Languages
    PHP, Javascript, CSS, HTML, Flash(so-so), Java(bit),C++(ok),XML,XSL(T)

Contact Methods

  • AIM
    jhechtf
  • MSN
    jhechtf@hotmail.com
  • ICQ
    0
  • Yahoo
    jhechtf

Profile Information

  • Location
    California
  1. Hey everybody, been a long time. I come bearing a question. I'm working on a website for a couple of buddies, and I'm trying to add some ambiguity in the AJAX calls by using Mod_Rewrite. RewriteEngine onRewriteRule ^([A-Z][A-Za-z]+)\\?(.*)?$ /modules.php?mod=$1&$2 At first I thought there was an error in my Regular Expression, so I decided to test it out in Javascript. Say I am trying to request /Data?user_id=1 The Javascript version returns exactly what it should, [Data,user_id=1], but the page redirects to /modules.php?mod=Data. There isn't even the ampersand, anyone have any ideas abo
  2. So as of late I've been attempting to get a calendar up and going in order to help out a club at the college I go to. I can get the calendar to be displayed, but the issue comes in at the type of database structure to be used. This was my first thought on creating the database structure: event_id INT UNIQUE NOT NULL AUTO_INCREMENT,event_title varchar(255) not null,event_start bigint not null,event_end bigint not null,event_all_day tinyint not null default 0,event_repeat_increment bigint not null My only problem with this method comes in on how I am supposed to determine if a timestamp of an
  3. They are probably using display:none and display:; (no value allows it to pick up default inheritance.
  4. jhecht

    Postable Calender

    by following that guide, it gives you a pretty much done n done calendar script. your job would be to thusly alter it to include hours/minuntes in the db, check the dates, and make sure that they dont conflict with one another.
  5. jhecht

    Postable Calender

    the hardest part about calendars is getting the offset correct in the tables. I saw a method used in a tutorial... the link ishttp://www.evolt.org/quick_calendar_using_ajax_and_phpFrom what i can give you the logic goes like this:get the current month, day, year.figure out what day of the week the first isfigure out how many days are in the current monthdivide days by seven, rounding up to count the weeks.loop through the weeks loop from 0-6 (1-7 respectively) for each day. subtract the current number from the day that first day is, any days not in the current month will be <=0, so you don'
  6. by adding an onclick event to the arrow's parent element (prefferably having it wrapped in a span tag), then setting a variable in that element to true/false for whether or not it should be clicked. Something along these lines: function toggle(el,toggle){ el = document.getElementById(el||el.id); toggle = document.getElementById(toggle||toggle.id); if(toggle.state==null || toggle.state==undefined) toggle.state='down'; if(toggle.state=='down'){ toggle.style.display='none'; toggle.state='up'; toggle.innerHTML="uparrow"; }else{ toggle.state='down'; toggle.style.display=''; toggle
  7. $_GET = good;$HTTP_VARS_GET = bad$HTTP_VARS_GET is from older installations of PHP. use $_GET n $_POST instead.
  8. It's entirely possible that I'm wrong, but from what i can gather it sounds like ur doing an AJAX request and you want to use it in the syncronis mode. If thats true, then all you have to do is this: var req = new XMLHttpRequest();//Screw IE;preq.open('yourPage.html','GET',false);// The arguments are page, method, async. Async can be true or false, if false, it loads syncronisly(sp?) and your code will be processed //in the usual line-by-line manner. If you're doing something else, then It's as Deidre's Dad said, there's really no sleep function that I am aware of in JS.
  9. think it might be called parseFloat in regular javascript. Not sure if its an object property or a global function though
  10. or the toFloat function i believe its called.
  11. jhecht

    If Statements

    You can't have the HTML outputted before a redirect You can try to use ob_start(), but i don't know if it'll work like that. You should download a template class to keep your PHP and HTML separate.
  12. jhecht

    If Statements

    $id = (isset($_GET['id'])) ? $_GET['id'] : false;//on some servers if id isn't in the query string, you'll get a "warning:undefind index," which gets really annoying.if(!is_numeric($id) || $id < mysql_num_rows($result) || $id < 1) header('location:notfound.php');I use is_numeric because i tried is_int awhile back numbers that were integers (1,2,3,4 etc) and everytime it would say that they weren't integers, however, is_numeric does it correctly. Maybe it'll be different for you, but i use is_numeric from past experiences. maybe it was a bug fix, I haven't tried it as of PHP5.
  13. Well then you could simply insert those ranks into the db, and if you learn enough about SQL you can realize that you can give more than one rank/title through the db set up i gave you.
  14. jhecht

    Apache and MySql

    is MySQL running on the system? That may be a good thing to look at.
  15. Well in MySQL the entire goal is to get rid of repetative natures in your database. What if you want to be able to more than 2 ranks(illogical, as i dont think you'd ever need more than 2 ranks, but you never know), or why have to check 2 position id's? That's not necessary.My structure, from what I can see of your table, would be CREATE TABLE sms_crew( crew_id int unique not null auto_increment, crew_firstname varchar(40) not null, crew_lastname varchar(50) not null, crew_rank_id int not null, crew_position_id int not null crew_active tinyint not null default 1);CREATE TABLE ranks( rank_id i
×
×
  • Create New...