I have a form that uploads a news article with it's picture and then stores all the info correctly. I am using codeigniter with Active Record and would like to know how to display the image with the post it was uploaded with. here is my upload script: public function create(){ $data = array('error' => ''); $config = array( 'upload_path' => './uploads', 'allowed_types' => 'gif|jpg|png', 'max_size' => '204800', 'max_width' => '1920', 'max_height' => '1080', 'encrypt_name' => true ); $this->load->library('upload', $config); if(!$this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $data['title'] = 'Create a news item'; $data['main_content'] = 'news/create'; $this->load->view('templates/template', $data, $error); } …

Member Avatar
Member Avatar
+0 forum 2

Hi there i want to create a news item that posts to my database (this works fine) but i want to be able to upload an image in the same form and submit the file path to the news table where all the other content is placed. Here is my View <h2>Create a news item</h2> <?php echo validation_errors(); ?> <?php echo form_open_multipart('news/create') ?> <label for="title">Title</label> <input type="input" name="title" /><br /> <label for="image">Featured Image</label> <input type="file" name="userfile" size="20" /><br /> <label for="text">Text</label> <textarea name="text"></textarea><br /> <input type="submit" name="submit" value="Create news item" /> <?php echo form_close(); ?> And my model: public function …

Member Avatar
Member Avatar
+0 forum 2

hi guys so this page where part of the form elements are made arrays by adding square brackets to the input names. the reason i did that is because that part of the form is handled in jquery [this post(my post about jquery)](http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/478800/show-form-elements-based-on-dropdown-value) if you take a glimpse will understand what/why i did in array. im trying to save the data into database but it gives me warning: > Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in D:\Xampp\htdocs\EMS2\add_contact.php on line how to post the data?

Member Avatar
Member Avatar
+0 forum 15

I would like to know if its possible to extract data from a database and then displayed the data in a pdf file ?

Member Avatar
Member Avatar
+0 forum 4

hi i am new to php and mysql, i am experimenting with a script for saving data to mysql database. and fetch the data on other page, i managed to get both of them without any trouble. But Here is the one problem. I added a additional input function to save the input data, but other input functions are working except the one i modified.!! i added the value through phpmyadmin and it works for fetching that data, but can not added value through this script.(see below, i have put down the code) i am using the latest wampserver.and the …

Member Avatar
Member Avatar
+0 forum 2

hi, i am new to mysql and also to php, i am trying to add a feature to a webpage, for showing some latest records from a mysql databse. i managed to show records from mysql database, but the problem is i only trying to show the first four records but it shows all the records i have in my databse. here is my script that shows the data from the database, so how do i managed to do that!! <?php $db = mysql_connect($mysql_server, $mysql_username, $mysql_password); if (!$db) { die('Failed to connect to database server!<br>'.mysql_error()); } mysql_select_db($mysql_database, $db) or die('Failed …

Member Avatar
Member Avatar
+0 forum 6

Okay so I have a PHP script that creates user acounts and encrypts the password then saves it into the database. The login form just compares the users password with a password in the database. The database has a password to connect to and user name. Is this enough security for my sites login? Or is there other things I should be doing?

Member Avatar
Member Avatar
+0 forum 11

I am trying to save database after inserting the records into dataset from external file.... But when I insert records and then try to save it, it does not save...No error comes up though.??? Can you please look into the code and help?? If file_path = Nothing Then Msgbox.Show ("Database file path is not provided!") End If Using reader As StreamReader = New StreamReader(file_path) ficontent = reader.ReadToEnd End Using Dim lines As String() = ficontents.Split(":") Dim recs As New DataTable() Dim key As String = lines(0).Substring(0, lines(0).ToString.IndexOf("]") + 1) lines(0) = lines(0).Remove(0, lines(0).ToString.IndexOf("]") + 1) Try Dim m As Integer …

Member Avatar
Member Avatar
+0 forum 2

I am trying to learn how to make a mobile phone communicate with a server and a database. So far, I have made a web-service on my PC using this tutorial: http://msdn.microsoft.com/en-us/library/ms733069.aspx The above tutorial makes a sortof WCF service. What would be the best Database system for me? Simplicity and ease-of-use is key. I was thinking either RavenDB or SQL Server. Any suggestions on what I should use and if there are any digestable tutorials online?

Member Avatar
Member Avatar
+0 forum 2

Hello. I allow members to post statuses on my website and i want to check links. And if that text includes "www" i want to make that a link. How would i check this everytime i pull the status from the database to show it on the page

Member Avatar
Member Avatar
+0 forum 2

I want to create a Entity class with database in Netbeans. When i select a Data source jdbc/Ionbank (custom Jdbc connection Using JDBC-ODBC bridge with Ms SQL 2005 as database). I see all the table from that database. All tables show no primary key, but they have primary keys in them. I am trying to find out what is problem. Thing i tried :- 1. Created new 4-5 data source. 2. Created tables using query, and not the New table option. 3. Tried changing Odbc connection. 4. Tried using different drivers for the Jdbc-Odbc bridge like Sql4jdbc.jar, Jdts.jar. Still No …

Member Avatar
Member Avatar
+0 forum 1

Hey Everyone, hope all good. i have a problem with some php that is not randomly selecting an ip. I will try to explain my problem below. I have a state form [CODE] <select name="State"> <option value="0" selected="selected">Select a State</option> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> etc..... </select>[/CODE] Any-time the customer selects a a state and submits the form it goes to my database and pulls an ip address releavant to the state. This is what my database looks like [CODE] +-------+---------------+ | state | ip | +-------+---------------+ | AL | 67.100.244.74 | | AK | 68.20.131.135 | …

Member Avatar
Member Avatar
+0 forum 2

hello guys! we have a big problem in our database. When we input values, and retrieve them in forms, we can see them. but when we look directly into our database, we can't see it. What is the possible problem? here is our codes to add values. [CODE] Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click If ClassName.Text = "" Then MsgBox("Please type the Class Name", MsgBoxStyle.Information) Else Dim obj As New DBClass Dim sql As String sql = "Insert into tblClass(ClassName) values('" & ClassName.Text & "')" obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() ClassName.Clear() End If End Sub [/CODE]

Member Avatar
Member Avatar
+0 forum 3

I am developing a desktop application in Java using Netbeans and MySQL database.Now i want to distribute the software.How to distribute the software along with the database?What is the total procedure.Should i use any software for this?

Member Avatar
Member Avatar
+0 forum 6

Hi all, I'd appreciate some advice concerning the following issue. I have a situation with two very different ways to implement. Both are easy, but Im not sure of the pros and cons of each. Basically I am allowing users to message each other on a website, and so I have the following table in my database: Message Table: MessageUID (PK), SenderUID, ReceiverUID, MesasgeText, DateMessageSent I also have another table thats stores images on the message. I allow users to paste pictures into the message and to position them. In this table I basically just store the picture name, the …

Member Avatar
Member Avatar
+0 forum 2

The End.