mik_se7
Members-
Posts
19 -
Joined
-
Last visited
mik_se7's Achievements
Newbie (1/5)
0
Reputation
-
what do I need to do to change convert a part of image to another
mik_se7 replied to hno's topic in PHP Coding Help
I'm sorry i do not know much about this subject only that image mapping was a way to manipulate images, have you tried to look at the source code of the website with the sofas? most browsers you right click on the background and chose view source. -
also while i'm thinking about your issue this would possibly be better handled with Javascript and ajax as PHP isn't actioned unless the page is refreshed in someway or the php code is called.
-
No that will just set your site to the time of your country and then your timing to midnight in Pakistan should work. you may have to reference it as a variable to get it to work with your crok1 and crok2 variables.
-
you can set the default timezone for your country like this replacing Country with your country, but check out this link because i couldn't find Pakistan on the list so you will need to find the closest to you that will fit your needs. http://php.net/manual/en/timezones.php <?php date_default_timezone_set("Country"); echo date('d-m-Y H:i:s'); //Returns IST ?>
-
what do I need to do to change convert a part of image to another
mik_se7 replied to hno's topic in PHP Coding Help
I believe its done using a process called image mapping here is a link that might get you started http://www.makeuseof.com/tag/create-image-map-gimp/ gimp is a free image software you can download. this website suggests using other programs to slice the image and assign each part different URL's http://www.htmlgoodies.com/beyond/css/how-to-create-image-maps-with-html-and-css.html -
whats on line 94 in add-contactme.php
-
you need to change the code to: for the name: if(isset($_POST['author'])) { $name = $_POST['author'] and for comments to if(isset($_POST['text'])) { $name = $_POST['text'] now the code should work just copy and paste this section over that code: // check to make sure name exists in POST if(isset($_POST['author'])) { $name = $_POST['author']; } else { // add error to $errors array $errors[] = 'Please enter your name'; } // check to make sure email exists in POST if(isset($_POST['email'])) { $email = $_POST['email']; } else { // add error to $errors array $errors[] = 'Please enter your email address'; } // check to make sure phone exists in POST if(isset($_POST['phone'])) { $phone = $_POST['phone']; } else { // add error to $errors array $errors[] = 'Please enter your phone number'; } // check to make sure comment exists in POST if(isset($_POST['text'])) { $comment = $_POST['text']; } else { // add error to $errors array $errors[] = 'Please enter your comment'; } // end validation
-
your passing your values but not telling where you want to add them. INSERT INTO table name (name,email, phone, comments) VALUES ('$name', '$email', '$phoneno''$comments') also you have 2 $result variables i would change the query to $query rather than $result
-
looking at the HTML code you have posted your not getting the values because your asking php to collect Name, Email, Phoneno, Comments but your id / names of your inputs are Authour, Email, Phone, Text. the $_POST will be looking for the input id / name to get the post from. if (isset($_POST['author']) && ($_POST['author'] !='')){ // get data from post $name = $_POST["author"]; $email = $_POST["email"]; $phoneno = $_POST["phone"]; $comments = $_POST["text"]; // echo result $result = $name - $email - $phoneno - $comments; } just put the <?php echo $result; ?> between your body tags in the HTML for testing purposes and it should display what is being sent from the form.
-
can we see your HTML code as it appears that the php cannot find the values name, phone, etc also it might help if at the top of your php you put $name = ""; $email = ""; $phoneno = ""; $comment = ""; this means that the variables are empty because until the forms details are entered they are empty and won't return a value for php to find an index and that should clear those errors
-
I cannot understand why you would want to convert and show the answer on a different page? you could divide your page into div's and have a results div at the bottom of the page near the submit button. you could then either have the php code above the HTML on the same page or use the include function to include the php stored on another page. that way you would have the user select conversion > submit form > php converts > answer appears in result div.
-
Use checkbox to send row value to cart php
mik_se7 replied to jamesreno20's topic in PHP Coding Help
not sure if you need this or might find it helpful: a check box on my form: <div id="table2a"> artist:<input id="checkboxes[]" name="artist" type="checkbox" value="Yes" onfocus="emptyElement('status')" maxlength="10"> </div> and more php code for you if you want to get the data for your database after the $variable i gave you before: $artist = mysqli_real_escape_string($db_conx, $artist); $db_conx is a connection file to my database which is more secure than posting your connection details in a support post and if anyone checks out your source code. -
Use checkbox to send row value to cart php
mik_se7 replied to jamesreno20's topic in PHP Coding Help
I used this php code for check boxes i had on a form i created: $variable = (isset($_POST['artist']) && $_POST['artist'] == 'Yes'); or you might find javascript more helpful: function getArtist(){ var artist =[]; var art = document.getElementsByName("artist[]"); for(var m=0; m<art.length; m++) if(art[m].checked){ artist.push(art[m].value); alert("the artist is "+artist); } } the javascript and php may require some work to fit your code and the javascript will require ajax code to send the data back to php for you to add to your database if required. you can remove or // the alert i just put that there to help you see if you get the right value your expecting -
Use checkbox to send row value to cart php
mik_se7 replied to jamesreno20's topic in PHP Coding Help
what happens with the code as it is does it give you an error message or not display all the fields? does it go onto the next page? -
Some jquery code is not working with appending of table rows
mik_se7 replied to mmdionisio23's topic in Javascript Help
Have you tried putting an alert in the if statement that is equal to 3 to see if the if statement is being actioned?