coupe-r
Members-
Posts
328 -
Joined
-
Last visited
Never
Everything posted by coupe-r
-
You posted this in a PHP forum?
-
anyone?
-
How can I make too different PHP programs that capture the following?
coupe-r replied to crodbos's topic in PHP Coding Help
Very simple. function homework() { for ($i = 2; $i <= 100; $i++) { if ($i % 2 == 0) { echo $i.'<br />'; } } } homework(); -
Hey All, I have a sessions table that is used to see if a user is online. It only gets deleted when they click the Logout button. What I need to do is have it so it gets deleted even if they close the browser. Should I add a column in the sessions table with a time stamp and check on each page for every user to make sure its great than 30 min? Is there a better way to do this, without so many queries? Thanks
-
if($tbilled < 0) { $tbilled = $tbilled + 24; } ?????
-
You can add it to the URL and use a $_GET['whatever']. so on each of your options, you could have if(isset($_GET['whatever']) && $_GET['whatever'] == 'OPTION' {echo selected=selected;} Something like that. That way, your drop down option is based on the URL.
-
How are those 2 tables related? Meaning, what column do they share (Some sort of ID).
-
Only kidding. Glad it worked out.
-
Hey Hey Hey, don't forget me!!!
-
What if you rename your index.html to index.php? Then see if your menu shows up?
-
Mail gets junked via Hotmail (PHP's Mail function)
coupe-r replied to ChrisMartino's topic in PHP Coding Help
I also have this problem. -
Thank you very much!!!!
-
OK, Ill just leave it so when I click ok it give me the ...id=123&del=1. Then I will do this: if(isset($_GET['id']) && isset($_GET['del']) && $_GET['del'] == 1) CODE HERE header(SAME PAGE) Thanks for all your help !!!!!!!
-
Alright, now we're getting somewhere. OK, now when the dialog box pop up and I hit OK, it takes me to index.php?id=98&del=1. Is there a way, instead of taking me to a URL, that it executes the delete query? Or is my only option to have an if(isset($_GET['id']) && isset($_GET['del'])) { DELETE CODE HERE; }
-
$del_text = '<a onclick="delete(\'index.php?id='.$id.'&del=1\');">';$del_text.'<img src="../images/delete_sm.png" title="Delete Application" alt="Delete Application" width="20" height="20" border="0" /></a>';
-
I really appreciate your help. Unfortunately, nothing happens when I click the icon.
-
Well, what I have is a .png icon and when you click it, the URL changes to del=true?id=123, instead of an actual delete button. Here is what I have "<a href='index.php?id=".$id."&del=1'>".'<img src="../images/delete_sm.png" title="Delete Application" alt="Delete Application" width="20" height="20" border="0" />'
-
Well, maybe Ill just have the box pop up, when they click yes, delete the record and forget about the other pop up that says its deleted. would you still recommend jQuery?
-
Yes, your img src isn't pointing to the file, its pointing to a URL. You need to have it point directly to a .jpg/.gif/.png file.
-
I am trying to display a js dialog box when someone wants to delete something. Currently I have it all with buttons and PHP in the background. When they click the delete icon, I want a dialog box to appear with OK or Cancel. On cancel, return back to the same page, If OK, I want it to run the PHP/mysql code that deletes the record from the DB. Once deletes, I want the box to appear again saying it was deleted successfully. I found this but now sure how to make it work. function show_confirm() { var r=confirm("Press a button"); if (r==true) { alert("You pressed OK!"); } else { alert("You pressed Cancel!"); } }
-
I am trying to display a js dialog box when someone wants to delete something. Currently I have it all with buttons and PHP in the background. When they click the delete icon, I want a dialog box to appear with OK or Cancel. On cancel, return back to the same page, If OK, I want it to run the PHP/mysql code that deletes the record from the DB. Once deletes, I want the box to appear again saying it was deleted successfully. I found this but now sure how to make it work. function show_confirm() { var r=confirm("Press a button"); if (r==true) { alert("You pressed OK!"); } else { alert("You pressed Cancel!"); } }
-
Perfect, thank you for your time.
-
The default value is automatically NULL, but it still reads a blank field, not NULL. Here is the var: $workphone = trim(mysql_real_escape_string($_POST['workphone_txt']));
-
OK, no problem. So it is OK if the DB fields dont say NULL and are just empty?