Jump to content

divinedesigns1

Members
  • Posts

    1,200
  • Joined

  • Last visited

Everything posted by divinedesigns1

  1. ok so i have been getting this problem for the pass year or so, please be advice it was two issues before and i have resolve 1/2 issues. my last issues is base on making sure that the format of the image or file matches with those i wish to be uploaded. // this is the formats$allowed = array('png', 'jpg', 'jpeg', 'gif');// if the format doesnt match display thisif($ptype == $allowed){ $errors[] = 'This format isnt allow</br>Accepted formats are as followed: PNG, JPG, JPEG, GIF';} i also tried this just to make sure i wasnt doing anything wrong if($ptype != $allowed){ $errors[] = 'This format isnt allow</br>Accepted formats are as followed: PNG, JPG, JPEG, GIF'; }else($ptype == $allowed){ $errors[] = 'ok'; } i still ended up with the same issues, which by pass the statement and allowed the format anyway. AS ALWAYS any tips, hint, or advice will do
  2. i find php takes sometime to load, specially when it comes to loading large amount of data
  3. ok, is there a way i can display this function function createdit(){ // get connected include "../xxx/xxxxx.php"; echo 'hello';} without using php, im trying to accomplish a smooth transition once the link is click from the menu, but i dont want the page to reload once that link is clicked. documents to read is always welcome, tips, hints, etc.
  4. ok, so im using wamp to do a fast php check whiles i create my scripts. now i created the entired script and im getting the following error as you guys tell me all the time, break down the script to make sure i dont have any errors, so im breaking down my codes and havent found any error at all so far. im up to the beginning of the script <?php // start the session session_start(); // display all errors error_reporting(E_ALL); ini_set('display_errors', '1'); // the connection include "../xx/xxxx.php" // the script for the login if(isset($_POST['submit'])){ }?> and the above script still giving the same errors, any idea?
  5. can someone tell me why everytime i add padding to a div with a width of say 100% or 80% the div expand....i thought padding was suppose to be for within the div and not suppose to expand that div or element.
  6. can i use php to pull that info into javascript? or is there another language besides php where i can open and read the files?
  7. is there a way to grab all the .mp3 files i have in a folder without having to write them one by one in the script? also can i do this for the files within the folders also?
  8. how can i go about adding an image in javascript code, if im using innerhtml to display my html text?
  9. oh alrite, talk about confusion lol thats why i like my php, but gotta learn javascript
  10. it worked, but question, why did it keep flashing when i have it to valid = true?
  11. it was the plus smh /[A-Z,a-z]+s[A-Z,a-z]+/ i should really just stick to this forum and not listen to my professor lol once again thank you i greatly appreciate it
  12. ok so i got that working with the valid variable but the statement that is true still aint working if(namecheck.test(fnlname.value)){ fulname.innerHTML = '<b>check</b>'; valid = true; } this suppose to make sure both first and last name is being input and once this is done a check is suppose to be displayed
  13. not too sure what you just say, but im not using a window.onload, so with the 'fulname' and innerhtml, im able to output the correct errors for that input
  14. nope, that didnt do it, im trying to make sure both first and last name is filled out that is a span with the id of fulname
  15. ok, so now im trying to add a check once the field of the form is filled out correctly, but im having problems outputing the "checked" function check(){ var fnlname, addy, numy, email, city, state, country, zip, namecheck; fnlname = document.getElementById('fnlname'); addy = document.getElementById('addy'); numy = document.getElementById('numy'); email = document.getElementById('email'); city = document.getElementById('city'); state = document.getElementById('state'); country = document.getElementById('country'); zip = document.getElementById('zip'); /*** check to see if 2 sets of words is placed ****/ namecheck = /^[A-Z,a-z][A-Z,a-z]+$/; if(fnlname.value == ''){ fulname.innerHTML = '<b>full name is missing</b>'; return false; }else{ if(!namecheck.test(fnlname)){ fulname.innerHTML = '<b>Both Names Required</b>'; return false; } } /*** if both names are filled in, display a "checked mark" ***/ if(fnlname == namecheck.test(fnlname)){ fulname.innerHTML = '<b>checked</b>'; return false; } if(addy.value == ''){ address.innerHTML = '<b>Address is missing</b>'; return false; }else{ namecheck = /^[A-Z,a-z]+$/; if(!namecheck.test(addy)){ document.getElementById('address').innerHTML = '</b>A full Address is Require</b>'; return false; } } return true; } any tips or hint or help will do just fine
  16. it workssss thank you soooo muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  17. hey i have been trying to fix this code where the validation for the form can be displayed using innerhtml, this is the issue, it displays but it doesnt stay i just flash when you submit the form <script language="javascript"> function check(){ var fnlname, addy, numy, comm, namecheck; fnlname = document.getElementById('fnlname'); if(fnlname.value == ''){ document.getElementById("fulname").innerHTML = 'full name is missing'; }else{ namecheck = /^[A-Z,a-z][A-Z,a-z]+$/; if(!namecheck.test(fnlname)){ } } } </script> <div class="forms"> <h2>Contact Us</h2> <form action="" method="post" enctype="multipart/form-data" onsubmit="check()"> <span id="fulname"></span> <input type="text" name="fnlname" id="fnlname" placeholder="First and Last Name"> <input type="text" name="addy" id="addy" placeholder="Address"> <input type="text" name="company" id="comy" placeholder="Company"> <input type="tel" name="numy" id="numy" placeholder="Number"> <textarea id="comm" name="comm" cols="40" rows="10" placeholder="Comment/Questions/Complains"></textarea> <input type="submit" name="submit" value="submit"> </form> </div> any hint or idea of what im doing wrong?
  18. woot woot, i actually figure it out, by making my statement here, i just needed to change one piece of code and rewrite the one important line of code for($x = 1; $x <= 5; $x++){ echo '<a href="rate.php?id=' . $row['id'] . '&rate=' . $x . '">' . $x . '</a>' . ' '; }
×
×
  • Create New...