Jump to content

Jezreel

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by Jezreel

  1. [!--quoteo(post=375588:date=May 20 2006, 06:23 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ May 20 2006, 06:23 PM) [snapback]375588[/snapback][/div][div class=\'quotemain\'][!--quotec--] While you could handle this in the DB, the "correct" way is simply to redirect to a new page _after_ sending the e-mail, such that there are no refresh issues. [/quote] I understand that.. but sometimes they refresh the page for whatever reason before sending the initial one which causes problems with the database and your solution still doesn't solve the "Back" issue. Thanks for responding, Jezreel
  2. Basically, I have a message system on my site and sometimes when a user refreshes their screen or "back buttons" to the page and resends the message the receipent obviously gets the message twice or even three times. So, I want to check the database prior to a message being sent to see if a message has been sent from the same user to the same user within 200 seconds and if it has, to not send it agan. I apologize for being a beginner programmer/coder but we all have to start somewhere. Here is the code prior to my poor attempt to modify it: [code]        $sql_query="insert into network (mem_id,frd_id)        values ($m_id,$frm->frm_id),($frm->frm_id,$m_id)";        sql_execute($sql_query,'');        $sql_query="delete from messages_system where mes_id='$inv_id'";        sql_execute($sql_query,'');        $sql_query="insert into messages_system (mem_id,frm_id,subject,body,type,new,folder,date)        values ('$frm->frm_id','$m_id','$subject','$answer','message','new','inbox','$now')";        sql_execute($sql_query,''); [/code] and here is my poor attempt to modify it. [code]        $sql_query="insert into network (mem_id,frd_id)        values ($m_id,$frm->frm_id),($frm->frm_id,$m_id)";        sql_execute($sql_query,'');        $sql_query="delete from messages_system where mes_id='$inv_id'";        sql_execute($sql_query,'');        $now=time();        $hic=$now + 200;       $sql_query="select * from messages_system where mes_id='$inv_id' order by date limit 0,1";            $hiccup=sql_execute($sql_query,'get'); //250         if ($hiccup <=  $hic) exit; [/code] Any suggestions or help in what I did wrong please? Thanks in advance, Jezreel
  3. Ok.. I am a beginner at Php/MySql, however most of the time I can feel my way around in the dark. However, trying to do this sort of hurts my head. I need to have a drop down list which retrieves the data for the drop down list from a MySql Database. The data is in a table that will constantly be growing so obviously the items in the drop down list will grow as well. So the table is called "Songs" and the field is s_title. When the drop down list retreives the data I need it to place the songs in alphabetical order as well. Any takers? Thanks in advance, Jezreel
  4. [!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]Found it here: [a href=\"http://www.php.net/mysql_num_rows\" target=\"_blank\"]http://www.php.net/mysql_num_rows[/a][!--colorc--][/span][!--/colorc--] No Need to Reply [!--quoteo(post=370600:date=May 2 2006, 12:08 PM:name=Jezreel)--][div class=\'quotetop\']QUOTE(Jezreel @ May 2 2006, 12:08 PM) [snapback]370600[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi, I need help with a snipet of code that will query the MySql database for the amount of rows that are in a table called "flashchat_connections" and then echo the amount of rows next to the text "Chat" as listed below. [code]</font> <a href="<?=$main_url?>/chat.php?mode=flashchat" target="_blank" class="mainlink bold"><font color="#FFFFFF">Chat</font></a> <font color="#FFFFFF">|[/code] This link "Chat" is in the header of my site and the idea is to have the amount of users that are currently in the chat room to be displayed next to it so they know how many people if any are currently in the chat room before they even enter it. The amount of rows in "flashchat_connections" is = to the amount of users currently in the chat room. I am also a newbie to this forum so I thank you ahead of time for mercy if I did not follow appropriate procedures in this message. Thanks, Jezreel [/quote]
  5. Hi, I need help with a snipet of code that will query the MySql database for the amount of rows that are in a table called "flashchat_connections" and then echo the amount of rows next to the text "Chat" as listed below. [code]</font> <a href="<?=$main_url?>/chat.php?mode=flashchat" target="_blank" class="mainlink bold"><font color="#FFFFFF">Chat</font></a> <font color="#FFFFFF">|[/code] This link "Chat" is in the header of my site and the idea is to have the amount of users that are currently in the chat room to be displayed next to it so they know how many people if any are currently in the chat room before they even enter it. The amount of rows in "flashchat_connections" is = to the amount of users currently in the chat room. I am also a newbie to this forum so I thank you ahead of time for mercy if I did not follow appropriate procedures in this message. Thanks, Jezreel
×
×
  • 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.