- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 32
- Posts with Upvotes
- 24
- Upvoting Members
- 20
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
84 Posted Topics
Re: > Trust IE to mess up another CSS prop. Sooner it dies a death the better. lmao ... Amen brother! Try this: <style> select { font-family: Cursive; letter-spacing:10px; } * html select { letter-spacing:10px; } </style> Also, a generally accepted practice is not to force a font size on the … | |
Re: Sweet mother of god ....I'm so confused. So first you said you want it to go from A --> B --> C, and then you said it should go A --> C and skip B? ![]() | |
Re: If your chat page is behind some sort of authentication, the easiest solution might just be an open source script like Ajax Chat from Sourceforge, however as diafol suggests, you'd have to clarify your requirements. Things like once the user is logged in, their username should auto-log them into the … | |
Re: This is a rather vague question, but I'm going to try to make an effort. What you could possibly do is use ajax/jquery to give the user a choice of how many input fields to display ... rows and columns, while dynamically generating unique identifiers for each one and using … | |
Re: Yea that tends to happen when you try to make a 6 year old snippet work. lol | |
Re: Well done veedeoo! Let's hope after reading this, people atleast realize how easy it is to implement PDO and stop using `mysql_*`. Everytime I see a question like "how do I make my code more secure" and see them using `mysql_*`, I die a little inside. Lol | |
Re: Don't you just love 1 post users who you just know are never going to come back if they don't get a solution to their problem right away? lol | |
Re: Supporting everyone else's responses, yes an "id" field set to being UNIQUE and AUTO_INCREMENT is supposed to never be the same as anything that came before it. However, when you say you try to 'echo all the posts', I'm assuming you mean you try to print everything on a page … | |
Re: This is a rather vague question Zeeshan. It would help if you explained the purpose or what exactly you're trying to do step by step. Also, "plugin" is a very specific term. Do you mean wordpress plugin or just a snippet? | |
Re: List your errors please. It would be helpful to know where you're hitting the roadblock. | |
Re: HOLY SYNTAX ERRORS BATMAN! Your HTML is fine but the PHP needs some fine-tuning. I'll try my best to go through a few things one by one and provide solutions as I go. This might end up being the longest post I'll ever write on Daniweb. Lol > it states … | |
Re: @Banderson: `session_destroy()` unsets all session variables bud, so it would be redundant to unset individual variables @davy_yg: Always remember what the official definition of `session_start()` is: "session_start() creates a session or **resumes the current one** based on a session identifier passed via a GET or POST request, or passed via … | |
Re: Hmm, this is most likely a CSS issue rather than HTML/PHP. Let's see your stylesheet. | |
Re: You have redundant code so your `$alerts` variable is not being defined as expected. $alerts = array(); // This isn't really needed if you're later going to use $alerts[] $alerts[] = array(); // This is essentially making $alerts a multi-dimensional array because you're defining an array variable with another array … | |
Re: Store the filename in a variable before running your delete query, then use `unlink` to delete it. It pains me to see you using mysql_* but I'll use it in this case to stay consistent with your code if (!empty($_REQUEST['student_id'])) { $student_id = $_REQUEST['student_id']; // Query to get student picture … | |
Re: Waooza that's one open ended question! What are you trying to accomplish though? Are you creating your own CMS or are you looking for a pre-built one? Things like Wordpress, Joomla, Drupal ... all have customizable themes from the admin panel, and some themes even come with abilities to for … | |
Re: I have to complement you on the great job you do with commenting your code. Well done! Since you already have the file name, all you should need to do is wrap it in an achor tag. Try this: echo "<a href=" . $file . ">Download File</a>"; | |
Why is Daniweb's mascot a dude called FRED? Why is it not a girl called DANI? lol ![]() | |
Re: Following up on what pritaeas said, you would either need to select one or create a new column that represents "relationship" between different products. This could be done a few different ways. For example, you can have two columns called `shirt_name` and `shirt_type`, that way you can have "ABC Shirt" … | |
Re: If you're posting the value of the radio to a different page, you might be over-complicating it by over-thinking it. Page 2: <?php // Posted value from Page 1 $radio_value = $_POST['radio_element']; if($radio_value == 0) { <button type="button" disabled>You can't click me!</button> } else { <button type="button">Click away!</button> } ?> | |
Re: This is a vague question. More details please. | |
Well, it has recently been bugging me that I have 8 years of working with PHP under my belt and not once have I tried to implement a custom solution to integrate PayPal into any of my ecommerce projects. I've worked with a lot of PCI API's from different providers … | |
Re: What you're looking to do is called "text masking" or "input field masking". It's easy to do with jQuery, however if you haven't done it before, it can be quite daunting to create a custom mask from scratch. A fast solution is to use one of the masking plugins available … | |
Re: `score` is not being set with a valid input. You should create a variable that increments the score first, then use that variable in your query: $new_score = $old_score + 1 mysqli_query($con,"UPDATE table1 SET score='$new_score' WHERE id='$id'"); | |
Re: Get in touch with your hosting company. They'll ask you a bunch of security questions but then should be able to reset your root password and give you a temp one. | |
Re: Are the number of columns always the same? If yes, you can just do something like this: <?php $header_name_one = // some user input captured through POST or GET $header_name_two = // some user input captured through POST or GET ?> <table> <tr> <th><?php echo $header_name_one; ?></th> <th><?php echo $header_name_two; … | |
Re: This sounds like another one of those "I have a pizza ordering site and I want to print an order automatically when its placed" things. Gahh! I doez not haz teh patience to explain server v.s. client side differences everyday. | |
Re: > dopdown value given to database What does that mean? You sure you don't have it the other way around? Do you mean pull values from a database and populate a dropdown menu? ![]() | |
Re: In your example above, try removing lines 79 to 82. if($i!=18) { $pdf->AddPage(); } | |
Re: Use `DateTime` and `DateTimeZone` // i'm assuming this is server time? $jtime = "2014-07-23 02:41:05"; // initialize a DateTime object $time = new DateTime($jtime); // initialize a DateTimeZone object to get the new timezoe $ist_zone = new DateTimeZone('Asia/Kolkata'); // set timezone $time->setTimezone($ist_zone); // if you're going to use am/pm, use … | |
Re: Software is the wrong word to use when you're talking about HTML and PHP. Using those two things, we build what are called "Web Applications" rather than software. If you're looking to build software, the beginner's path to take would be either Java or C#. | |
Re: I'll answer your second question first since the solution will make more sense after that. What you're saying is correct, however it's your code implementation that's not corresponding to what you're *TRYING TO SAY*. You're trying to compare pure javascript to library implementations of javascript (in your case, jQuery) and … | |
Re: Ahh shoot, I knew I should have brought my magic mind reading crystal ball with me to work. | |
Re: This should just be a matter of combining `WHERE` and `AND` operators like this: $handler = $dbh->prepare('SELECT * FROM users WHERE first_name = :first_name AND state = :state AND occupation = :occupation'); $handler->execute(array( ':first_name' => 'Joe', ':state' => 'New York', ':occupation' => 'Engineer')); | |
Re: Since both your arrays are setup as `$key => $value` pairs, you have to explicitly tell `array_combine` which array to use for what. This should work: $array = array_combine(array_keys($database), array_values($skill_type_count)); | |
Re: <?php // will NOT update since there is no "payee" named "rw" // because "rw" is supposed to be a variable // so change payee = 'rw' to payee = '$rw' $s="UPDATE finance SET credit ='" . $r. "' WHERE payee = 'rw'"; $res = mysql_query($s) or die(mysql_error()); ?> | |
Re: Hey wikit, this might be another one of those item and wish question for yours earlier that you're trying to explain but not getting the words right. Do you mean you want to control access to a page to make sure any given user can only view THEIR OWN detailed … | |
Re: You probably should have PM'd Dani about this first instead of asking it publicly. | |
Re: I'm a little confused by the table example you gave above. How would that work for different items and wishes since you say "looks at ALL items and ALL wishes"? When I think about what you're looking for, I'm thinking more along these lines, with separate tables for each item … | |
Re: Calling PNotify is as simple as using the `onclick` event. Example: <button onclick="new PNotify({ title: 'Yayyy you clicked me', text: 'Haha, made you click' });">Click Me!</button> I'm guessing your main concern is submitting the form. For that, as iamthwee suggests, you'll have to use jQuery's AJAX function. That function allows … | |
Re: The OP hasn't returned in a month. I'm guessing this thread is dead? | |
Re: Your array values separator (the comma) is not in the loop so your array is basically a mush of all values with a comma at the end: var availableTags = ["ActionScriptAppleScriptAspBASICC",]; Your `echo` statement should be like this: var availableTags = [" <?php $query = mysql_query("SELECT * FROM countries"); while($row=mysql_fetch_array($query)) … | |
Re: You might be thinking of this in a little too simplified of a way bud. Look at it this way...if you're logged into facebook already, your broswer stores a cookie. When you visit a page with a like/share button, your browser sends facebook info about that cookie, which is how … | |
I just wanna get a feel for the opinions that exist out there about this subject. I've worked with everything from small to very large image storage requirements within PHP and MySQL. What are some of the issues/usage requirements that you guys look at when considering building mysql apps that … | |
Re: I personally think sortable tables took best if done with ajax so there are no page refreshes, but in your case, the easiest way would be to pass a `$_GET` variable to your url everytime someone clicks on a table header, then put your `$query` in a conditional statement. For … | |
Re: As stated in the above comments, it can be done however it's a matter of how fancy looking you want your charts to be. I've used the PHPlot library from sourceforge before and it does a decent job of it, however I believe the OP has abandoned the project since. … | |
Re: Waoooza that code's got SQL injection written all over it. Anyway, try this for a sec: echo " Are you ready for the exam " . $_POST['firstName'] . "?" . "<a href='math(1).php' > Click here</a>"; and see if you're getting the firstname correctly on that page before saving it to … | |
Re: Give this a try, change element names as needed ofcourse :) Just some test HTML: <div id="test"> Spongebob Squarepants </div> ...and the JS: $(document).ready(function(){ $("#test").dblclick(function(){ alert(getSelectedText()); }); }); function getSelectedText() { var selectedText = ""; if (window.getSelection) { selectedText = window.getSelection().toString(); } else if (document.selection) { // for IE 8 … | |
Re: I feel like responding to this question would be like beating a dead horse. It's been asked, answered, debated upon, argued about so many times by now that calling it a redudant question would be a MAJOR understatement. Please, do us all a favor and do a quick google search. … |
The End.