39,388 Topics
![]() | |
I also have a string stored in a session variable but can't figure out how to get it back out again... THIS CODE IS PAGE 1. <form action="page1.php" method="post" id="register-form" novalidate="novalidate"> <b>Postcode:</b> <input type="text" name="search" /> (required)<br /> <?php @session_start(); if (empty($_POST['search']) && isset($_POST['submit'])){ echo'Please enter postcode i.e. ZZZZ'; } … | |
Fatal error: Call to a member function add_content() on a non-object here is my index: <?php include ('lib/connect.php'); include('lib/nav.php'); if($_POST['add']): $obj->add_content($_POST); endif ?> Here is my function: <?php function add_content($p) { $title = mysql_real_eacape_string($p['title']); $body = mysql_real_eacape_string($p['body']); if(!$title || !$body): if(!$title): echo"The Title is required"; endif; if(!body): echo"The Body is … | |
Hi,I can't display Multiple checkbox save value in my veiw page. Here is insert/save value details: Model --------- public function saveInstituteOfferdCourse($data = array()) { if ($this->db->insert('tbl_course_offred', $data)) { return $this->db->insert_id(); // tbl_course_offred = "Table name" } return FALSE; } ---------- Controller ---------- public function saveCourses() { $data = array(); $this->load->library('form_validation'); … | |
Hi friends, Waht are the differences between Sessions and cookies in PHP? Please explain with examples. Thanks & Regards Jasonmark ![]() | |
Hi Guys I am currently using the opendir to display all files and folders in a specific directory code below. It displays great however it display each file twice. If it is a folder then it will just display once. I have check the folder on the server and there … | |
Hey, Been writing my own php snippet but I'm having a few issues. I have a drop down which is populated by the mysql db however when I click delete it runs an action and throws an error. Form: <form action="deleteuserform.php"> <select> <?php $sql="SELECT id,customer_name FROM Customers"; $result =mysql_query($sql); while … | |
This isn't so much a help thread more of a discussion. I have this idea that once I have a lot of users in a database that I can then grab them from a drop down and place them into the template like a webpage etc which can be printed … ![]() | |
I have a php file that reads a csv file and pulls the data and displays it on the site. But unfortunately I don't know why it creates an extra line which sets the counter to go wrong... How do i fix that? This is my code: <style> table{width:100%; border-collapse:collapse; … | |
How to extract an article which is a html page from a rss feed in php. ![]() | |
I have been searching all morning and I cant seem to find a reliable source for a decent slideshow script, I am working on creating one myself now, if anyone has any helpfull hints or tips, or even if you have some code snipets that would be usefull for my … | |
Hello, I am thinking about making one small project with PHP, javascript, becasue I don't have experience in other languages too much. It would be something like addition to a windows program which uses postgre sql database. I see that I can make one feature from that database. For me … | |
I want to extract the contents from the below link using Rssfeed in php. plz help me someone. i hvae tried all the possibilites,i am not getting. http://www.jacionline.org/current.rss | |
Hey all, Recently been working on a website which now looks REALLY good in FF and Chrome however in IE it looks absolutely terrible... is it possible to make it so anyone who goes to the site on Internet explorer is automatically taken elsewhere? like a new directory? Thanks | |
i am just start to learn php and using dreaweaver for practice, i just want to know that like other languages can we debug php code if can then how we debug php code in dreamweaver or any other editor for php? | |
<!DOCTYPE html> <html> <head> <title>Registration Form</title> <link rel="stylesheet" media="screen" href="style.css" > </head> <body> <div class="head" style="background:#343434;width:auto;height:100px"> <br/> <h2 Style="color:white"><center>NAVAL DOCKYARD, VISAKHAPATNAM-530 014 </br> APPLICATION FOR ABSORPTION OF TRADESMAN(SKILLED)</center> </h2> </div> <form enctype="multipart/form-data" class="contact_form" action= "<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <ul> <h4>Registration Form </h4> <hr/> <li> <label for="name">APPLICANT PHOTO :<sup style="color: … | |
i'm storing 2 images at a time in my database table in a single row. 1st image was Applicant Photo Name as Image In Db & Second Image Was Applicant Sign Name as Sign in Db. So I'm retriving Both At single shot.But I'Want To Display Images Both At a … | |
Hii I am trying to do that when i clicked on particula Category ,only subcategories of tht clicked category show and rest subcategories ll hide ....im getting problem because it is in loop ,if im applying any script it implement on all..so please any better way to do it ..so … | |
My brain won't work (in fact it doesn't often when it comes to comparing dates). I need to check whether a date returned from the database is 7 days or less from the current date (can't do it in database as it is used to highlight events where entries close … | |
Hi everybody, i have problem in my php code (it just showing nothing....means no error no results).......can anybody tell me what is wrong with this code.....i'm new to PHP........here is my code <?php try { $config=array( 'DB_USERNAME'=>'root', 'DB_PASSWORD'=>'' ); $conn=new PDO('mysql:host=localhost;dbname=scc',$config['DB_USERNAME'],$config['DB_PASSWORD']); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo rand_id(); } catch(Exception $e) { echo … | |
Good afternoon, I have an MP3 of a short presentation that I would like to make available on the index page of my members site. Actually it is already there... and it works. But, the problem that I have is that when you click on the link, it opens the … | |
Hello. I received some code that has a section in which the variable $DB is established. $DB =& new DB($db_username, $db_password, $db_dsn, false); It does this by calling a function named DB, which is shown here below. /** * Constructor * * will set $DB->error and return false if login … | |
any idea how I can get a string to return from an ajax call taking the href from an object using: (javascript) $('herpy').attr('href').toString() into a PHP controller as a string so it can be used as a parameter in sql code? Everything I try results in this bizzarre array being … | |
So I have a form customers fill out. When they check a few checkboxes t150 (t8) through t440 (t45) they will get the intended version of the quote with all of the checked models included in the quote, but if they check one of the models in the t150(t8) through … | |
Hello, I followed the tutorial from [this site here](http://www.html-form-guide.com/php-form/php-login-form.html) and have added the login/registration to my test site. The problem is I now need to add two currencies to each user. On the database I have created two rows for 'invested' and 'return' and need these to be unique to … | |
hi every one a problem in project i have admission page in that i need auto generating number,every time i refresh the page i need to get autogenerating number can any one help me | |
I am trying to delete pictures from the server that are associated with a specific item, that way when the user clicks on the delete button it will delete the item as well as all pictures associated with it, after doing a bunch of searching and experimenting I have this … | |
Hello I want to extract content of a website found between some specific html tags.How can i achieve that with php. For e.g consider viewing google.com soure code.I want to extract data with <title> </title> tags and store it in a variable(its "Google" in this case) Bascially script navigates to … | |
Hello everyone, I am once agian running into a problem with something that's normally simple, yet lovely cakePHP has to make all so very hard. I'm once agian tasked with improoving the bookmarking application on our website. This time I am suppose to have the url save the date: start … | |
hey guys im trying to update my database here, the code is running fine session_start(); $school_id = $_SESSION['school_id']; $faculty_id = $_SESSION['user_id_fac']; $subject_id = $_POST['subject_id']; $year_grade_level = $_POST['year_level']; $subject_handeler_id = $_POST['subject_handler_id']; $student_grades_boy = $_POST['student_grades_boy']; $student_grades_girl = $_POST['student_grades_girl']; $values_boy = array(); foreach ($student_grades_boy as $key=>$data) { $student_id_B= $data['studnt_B_id']; $grade_B = $data['studnt_grade_B']; $values_boy[$key] … |
The End.