- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 12
- Posts with Upvotes
- 11
- Upvoting Members
- 9
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
- Interests
- Programming
88 Posted Topics
Re: Let's see what you've so far. I mean post some code and we will help you. | |
Re: Try this input_form.php [CODE] <?php echo "<form method = 'POST' action = 'process.php'>"; for($counter = 0; $counter < 10; $counter++) { echo "<input type = 'text' name = 'username[]' class = 'class_name'/><br/>"; echo "<input type = 'password' name = 'password[]' class = 'class_name'/><br/>"; } echo "<input type = 'submit' value … ![]() | |
I have the following class that I intend to validate by passing it in the symfony validator. <?php namespace Shop; use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; use Shop\Validation\Constraint as ShopAssert; class Country { /** * * @var int */ public $id; /** * * @var string */ public $name; /** … | |
![]() | Re: Try this: Database name : [B]news[/B] Table holding information about reports : [B]reporters[/B] Column names in the [B]reporters [/B]table : [B]reporter_id[/B], [B]name[/B] Table holding news items reported by your reporters : [B]reports[/B] Columns in the reports table : [B]report_id[/B], [B]reporter_id[/B], [B]report[/B], [B]date[/B] Note: The report_id is assigned automatically by [B]mysql[/B] … |
Re: This this [url]http://www.daniweb.com/forums/thread331498.html[/url] | |
Re: Modify your update statement to the one below [CODE] mysql_query("UPDATE count SET count=(count + 5) WHERE username = '$username'"); [/CODE] | |
Re: The reason you getting this error is that the mysql_fetch_array function expects a resource but is being passed a boolean. What you should know is that the [mysql_query](http://www.php.net/mysql_query) function will always return a boolean if there is an error in your query. The error in your query has been pointed … | |
Re: Here is a simple example: [CODE] <?php if(!isset($_POST['send'])) { ?> <form method = "post" action = "<?php echo $_SERVER['PHP_SELF'];?>"> <table width = "40%" align = "center"> <tr> <td>First name</td> <td><input type = "text" name = "fname"/></td> </tr> <tr> <td></td> <td><input type = "submit" name = "send" value = "SEND"></td> </tr> … | |
Re: Compare this code to what you have done and you will see what is wrong with you code. [CODE] <?php if(!isset($_POST['send'])) { echo "<form method = 'post' action = '".$_SERVER['PHP_SELF']."'>"; echo "<table>"; echo "<tr>"; echo "<td align = 'center'>STUDENT ID</td>"; echo "<td align = 'center'>SCORE</td>"; echo "</tr>"; for($counter = 0; … | |
Re: Other than storing your data in plain text file as broj1 has pointed out, you could also store it in a XML file. You can use cookie, but please DO NOT use this approach if you are storing sensitive information. Also remeber that there is a limitation on how much … | |
If I have a model called Admin_user which extends CI_Model, how do I name the file in which this model class is so that codeigniter can load it? I named the file admin_user.php and placed it in application/models directory but Codeigniter does not load the class when I try loading … | |
I'm finding it difficult to configure public link in ajaxplorer. According to their documentation, this setting can done in server/conf/conf.php but the problem is there is no such file as server/conf/conf.php in the entire application folder. I currently using ajaxplorer 4.2.3. ![]() | |
Re: So, I do I know which line is line 17? Please use code tags. ![]() | |
Re: This is what I got when I ran Narue's program on my netbook: Operating System: Windows 7 Utimate Processor: Inter atom N455 1.67 GHz Memory: 2 GB Printf: 289.978 s cout: 23.950 s | |
I am learning to using STL, and I'm currently on vectors. I have seen a lot of examples and practiced a lot on my own using built in types, but I'm finding very difficult storing objects that I create my self in a vector. Everything works fine when I add … | |
Re: Not a CSS guru but from what I see, the problem is on line 7 (** border-right: 1px solid #FFFFFF;**) of your code below. You have two ways around this: 1. Change the border-right color to match that of border-left. 2. Set the width of the border-right to zero. #nav … | |
Can anyone explain to me why this simple program won't print anything? #include <stdio.h> #include <ctype.h> char * mkUpperCase(char *); int main(void) { char name[] = "information"; printf("%s\n", mkUpperCase(name)); return 0; } char * mkUpperCase(char *s) { while(*s != '\0') { *s = toupper(*s); s++; } return s; } | |
Re: You said you are using a form, right. Well, I can't see any form tag on page. You should correct that first. Also make sure that if your form uses the POST method, you access the form variables through $_POST global variable in your PHP scripts, and the get $_GET … | |
Re: The problem is in line 6 on the index.php . On that line, you write if(isset($_session['username'])) instead of if(isset($_SESSION['username'])) | |
Re: The mysql_num_rows function is used only on queries that return records from mysql database. So you can use it on SELECT queries but you cannot use it on UPDATE, INSERT, and DELETE queries. This is because these queries return booleans no mather what happens. | |
Re: UPDATE statements don't return resource, they return boolean values so the value of $result1 on line 16 will always be boolean. You are getting that error message because the mysql_num_rows function expects a resource, not a boolean. | |
Re: Don't trust user input, always use [B]mysql_real_escape_string()[/B] on user input. | |
Re: I don't understand what you mean by "update the textbox values with new values when i have already values in textbox in php ", but I think you are calling for AJAX. | |
Re: [QUOTE]I have login issues here, I create a login sytem I success to make that, in my web after login page it will go to admin page but when I click browser's back button in the admin page again. I try to put session in login page and identify it … | |
Re: If it works for some images but not mp3's, then the problem may be with file size. Your images maybe less than 2M that is why it is working. It is not uploading your mp3's probably because they are over 2M in size. Open your php.ini file and read what … | |
Re: If you need to do this without an array, then try this. 1. Declare variables to hold the sum, average( and a variable to hold the number of inputs, a counter, the user has enter in order for you to calculate the average), product and so on. 2. Initialize the … ![]() | |
I have the following CSS. This works fine but not in IE and Opera. [CODE] #content { position: absolute; left: 0; right: 0; min-width: 750px; max-width: 1100px; min-height: 700px; margin-left: auto; margin-right: auto; background-color: #FFF; top: 150px; } [/CODE] | |
Hello everyone. I'm planning of implementing auto-logout in a project I have in mind and I want you guys to tell if the way I plan to do it is the best. This is how I plan doing it. I will have table in my database, say [B]cossay_tb[/B], containing three … ![]() | |
I have this small site that I'm developing for a friend. My problem is that elements are disappearing in ie, even the version 9. The elements that are disappearing are within another element that's been floated. Screenshots of the pages are below. The first screenshot is how the page looks … | |
Re: If want just an editor, notepad++ portable is [URL="http://portableapps.com/apps/development/notepadpp_portable"]here[/URL]. But if you a complete IDE with compiler and everything, then you might want to consider getting a portable OS (if one really exist) like Moschops said. | |
Re: I'm not a PHP wiz but I think I can say something about this. Making your PHP scripts create databases and tables isn't a bad to me, but just as everything has two sides, a lot of people will tell you why they think is a good idea and a … | |
Anytime I try to compile the code below I get the following error message. E:\Users\Cosman\Desktop\C++ PRACTICE\read2.cpp|52|error: no match for 'operator<<' in 'std::cout << m' How do I correct this? [CODE] #include <iostream> #include <fstream> #include <cstring> using namespace std; class A { private: char name[50]; char gender[8]; int age; public: … | |
Re: If you can create list box in plain HTML, then you should be able to do it in PHP too. Simply [B]echo[/B] them. | |
Re: Make the following changes to your code: 1. One line, write [CODE] $nama = array('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit'); [/CODE] instead of [CODE] $nama = ('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit') … | |
Re: Lines 9 and 11 should be terminated as mentioned by Shantic C. Also, your double quotes should be (" ") not (“ “). From what I can see, you typed lines 5 to 7 yourself and copied and pasted line 9 from somewhere. I encounter this problem anytime I copy … | |
Re: Rewrite your code this way [CODE] <html> <body> <?php $con = mysql_connect("localhost","eduardli_user","-z.x,c"); if (!$con) { die('Could not connect: ' . mysql_error()); } $description = $_POST["description"]; $price = $_POST["price"]; $quantity = $_POST["quantity"]; mysql_select_db("eduardli_company", $con); mysql_query ("INSERT INTO Products (Description, Price, Quantity) VALUES ('$description', '$price', '$quantity')"); $result = mysql_query("SELECT * FROM Products"); … | |
Re: The blank page you are getting is exactly what you are suppose to get. The reason is that you are only checking if the user has entered a username and password. Your script will only output "[B]Please enter a username and a password"[/B] if the user does not provide a … | |
Is dreamweaver for professional developers or people who have very little knowledge of programming? | |
![]() | Re: Use PHP, it's much easier than JSP. |
Re: What kind of error does it show? I think you should also post the code for your form. | |
The program below crashes anytime I run it, can anyone tell what I have done wrong?. [CODE] #include <iostream> #include <cstring> using namespace std; class Human { private: char *fname; char *srname; char *phone; public: char * getFirstName(); char * getLastName(); char * getPhone(); Human(char *fn, char *sn, char *ph); … | |
Re: Even if the program above works, the result will also be incorrect because integer division. I started C++ 3 days ago so the little I can do is this [CODE] #include <iostream> using namespace std; double RParallel(double[], int); int main() { int input_size; cout<<"Please enter number of inputs : "; … | |
Re: The problem is on line 6. You should write [CODE] if ($n%2==0) [/CODE] instead of [CODE] if ($n%2=0) [/CODE] ![]() | |
Re: Line 19 should be [CODE] int main() [/CODE] instead of [CODE] void main(void); [/CODE] Line 61 [CODE] void write_output_data() [/CODE] instead of [CODE] void write_output_data(void); [/CODE] | |
Re: This is an example of what I think you want to. I have a database, [B]mm[/B], which contains a table, [B]try[/B]. The [B]try[/B] table has the fields [B]id[/B] and[B] age[/B]. I also have two pages [B]you.php[/B] and [B]me.php[/B]. On the y[B]ou.php[/B] page, all the [B]id[/B]'s are pulled from the [B]try[/B] … | |
Re: What do you mean by edit records with image? | |
![]() |
The End.