-
Posts
3,145 -
Joined
-
Last visited
-
Days Won
37
Everything posted by cyberRobot
-
There needs to be a space between the WHERE and LIMIT clauses. <?php $query .= "WHERE id=$subject_id "; //<-- added a space here $query .= "LIMIT 1"; ?>
-
Have you considered jQuery? Here is an example timepicker plugin: http://trentrichardson.com/examples/timepicker/ ...or you could try some other options: https://www.google.com/search?q=jquery+timepicker
- 2 replies
-
- date picker
- time picker
-
(and 1 more)
Tagged with:
-
I have marked the thread as solved. If you need anything else, please mark it as unsolved...or start a new thread.
-
php form data does not always send to email
cyberRobot replied to siric009's topic in PHP Coding Help
Perhaps the message is being flagged as spam. Has the form been found by spammers yet? Another thing to consider is that your website host may have been flagged as a spammer. With the email solution being flaky, have you considered an alternative? You could, for example, save the RSVPs to a text file or database. It may not be as convenient as email, but it's more reliable. Even if you continue using the e-mail solution, I would recommend that you also save the message to a database/file for backup purposes. Side note: PHP provides a filter for email addresses: http://php.net/manual/en/filter.examples.validation.php -
Sorry, I'm a little confused as to what you're asking. It sounds like you already have a upload process up and running. It also sounds like pictures have already been uploaded using this solution. Now it sounds like you're trying to create a separate solution for viewing the uploaded images...is that correct? If so, have you considered using the <select> tag? http://www.tizag.com/htmlT/htmlselect.php The tag could be populated from a database...or a solution like vinny42 suggested.
-
Try removing the quotes: http://php.net/manual/en/language.types.null.php
-
Is there any JavaScript associated with the form? There may be some code over-ridding the action attribute.
-
I marked the topic as solved. If you need anything else, please mark it as unsolved or start a new thread.
-
Is that the exact code from validering-navn.php? If so, you need to include the open PHP tag. <?php //<-- ADD THIS function validerFornavn($fornavn) { //... ?>
- 2 replies
-
- funtion
- writeonfile
-
(and 2 more)
Tagged with:
-
Could you provide a little more information as to why you're trying to call two different scripts? If there isn't a way to merge those scripts, have you considered just calling the first script. Once that script successfully executes, use the header() function to redirect them to the second script. Of course, you would need to pass the form data with the redirect.
-
If you're looking to display the form when $number1 doesn't match $number2, just put the form in the if portion. <?php $number1 = "01234"; $number2 = "012345"; if($number1 != $number2) { //if they don't match output the following //echo "info do not match. Please try again."; ?> <form method="post" name="change"> <p>Number 1 Info<br /> <input type="text" name="number1" /> </p> <p>Number 2 Info<br /> <input type="text" name="number2" /> </p> <p> <input name="submit" type="submit" value="Check if they match" /> </p> </form> <?php } else { //if they match output the following echo "Info matched Successfully!"; exit(); } ?>
-
The PHP manual shows how to use mysql_real_escape_string(). It also provides an example SQL Injection Attack which could be used against an unprotected query. http://php.net/manual/en/function.mysql-real-escape-string.php Side note: the mysql_ functions are officially depreciated. If you're not doing so already, you should start considering the alternatives: http://www.php.net/manual/en/mysqlinfo.api.choosing.php
-
No problem, glad to help. Note that I marked the topic as solved. If you need further assistance, please mark it as unsolved or start a new thread.
-
Now I didn't look at all the CSS, but the menu seems to work with the following changes: Under ".dropdown-menu li a", add "width:205px;" Under "#menu a", change the text-align property to "left" Add a ".dropdown-menu li a:hover" option and add "width:205px;" Note that I don't know what that does with the rest of the website. You'll have some cleaning up to do...and some testing.
-
First, radio buttons should have the same name. There's no need for the array format. Also, you wouldn't need to escape all those double quotes, if the input tags are enclosed in single quotes. Double quoted strings are only needed if the string contains things like variables or other special characters (\r). <?php //... foreach($marketingimportance2 as $marketingimportance){ $marketingvalueOutput .= '<input type="radio" class="radio" name="marketingimportance" value="' . $marketingimportance . ' \>' . $marketingimportance . " \r"; } //... ?> With the radio buttons having the same name, you can use a single POST variable to populate the radio buttons. Here's a quick example (note that you'll need to adapt it for your own code): <form method="post" action=""> <?php $marketingimportance2 = array('this', 'that'); foreach($marketingimportance2 as $marketingimportance){ print '<input type="radio" class="radio" name="marketingimportance" value="' . $marketingimportance . '"'; if(isset($_POST['marketingimportance']) && $_POST['marketingimportance']==$marketingimportance) { print ' checked="checked"'; } print ' />' . $marketingimportance . " \r"; } ?> <input type="submit" name="submit" /> </form>
-
Have you used $_GET variables before? http://php.net/manual/en/reserved.variables.get.php If the GET variable is found, you would display the corresponding article. Otherwise, you would display the list of articles.
-
For generating the map, have you considered something like jVectorMap: http://jvectormap.com/examples/mall/
-
Did you see the responses to the same question you asked yesterday? http://forums.phpfreaks.com/topic/281862-passing-a-get-value-with-out-href-links/ If these don't work, it might help if you provide a little more information on what you're trying to accomplish.
-
Moving to PHP forum. To hide empty cells, you could do something like <?php echo '<tr>'; if(!empty($row['CUST_ID'])) { echo "<td>{$row['CUST_ID']}</td>"; } //... echo '</tr>'; ?>
-
That would be more of a PHP question then, would you like me to move the topic? Are you trying to remove the entire row if all the cells are empty...or are you just wanting to remove individual cells that is empty?
-
I marked the topic as solved. If you need further help, you can mark it as unsolved...or start a new topic.
-
It's actually "empty-cells:hide;" https://developer.mozilla.org/en-US/docs/Web/CSS/empty-cells
-
Need help with functions mysql_fetch_assoc
cyberRobot replied to WebsoluteSW's topic in PHP Coding Help
No problem, glad to help. Side note: Perhaps you are already aware of this, but the mysql_ functions have been depreciated. More information about the alternatives can be found here: http://www.php.net/manual/en/mysqlinfo.api.choosing.php -
@wmeredith - When posting code, please surround it with tags. This places the code in a scrolling box and makes it easier to read.