569 Posted Topics
Re: Have you tried... [code] <?php include "db.php"; //Rows $qtyRow = '<tr>'; $priceRow = '<tr>'; $nn=12; //Number of items, we split this later $s=mysql_query("SELECT * FROM `test1`"); $c=mysql_num_rows($s); if($c%$nn==0){ $cc=$c/$nn; }else{ $cc=$c/$nn+1; } //$cc : Number of pages $ss=@$_REQUEST['ss']; //Start position (eg: 6) $other_tables = ""; if($ss=="" || $ss==null){ $ss = … ![]() | |
Hello, I'm a mac user and starting a new module in Prolog and wondering if there are any applications that can compile and run Prolog for mac? Sounds silly, but can use terminal? Thanks :) | |
Re: Just a suggestion: Put the data you're posting into variables: [code] $firstName = $_POST['updateFN']; $id = $_POST['perID']; [/code] | |
Hello, basically I have two tables: People Orders Now I want to grant the first person in "Peoples" with all privileges, now I've tried to do this: [code] GRANT ALL ON Orders TO {testUser |PUBLIC |role_name} [WITH GRANT OPTION]; [/code] Doesn't work (because they are technically not a user, therefore, … | |
Re: [code] <?php if(isset($_POST['user'])) { $user = $_POST['user']; $pass= md5 ($_POST['pass']); $con = mysql_connect("localhost", "root", ""); if(!$con){die('could not connect: '.mysql_ereor());} mysql_select_db("test", $con); $query = "SELECT * FROM users where username='$user' AND password='$pass' "; $result = mysql_query($query); if(mysql_affected_rows() == 1) { while($row = mysql_fetch_array($result)) { $expire = time()+60*60*24*30; setcookie("uid", $row['uid'], $expire); echo … | |
Re: Okay.. As Catherine says would print out the title, however, to address your other question about displaying the books on a separate page: 1. Make sure your table consist a primary key (book_id) 2. Query the Book title, as well as the book_id 3. Create a new script (page) that … | |
Re: Hey, has this been answered? I can try and give some clarification, if you like.. Let me know =) | |
![]() | |
Re: It compiles =) [code] #include<iostream> #include<stdlib.h> using namespace std; int main() { int i1,i2; i2=0; int t=0; cout << "enter the value" << endl; cin>>i1; t=1; sleep(2); if(t==0) { cout<<i1; } else { cout<<i2; } return 0; } [/code] Dunno what the program is expected to do! | |
Re: Have you started it? Can you post the code that you're struggling with? Sorry but you need to attempt it, that's the reason you're doing assignments, and, not to post them on forums for others to do! =) | |
Re: 1) You shouldn't post home-work tasks and expect people to just complete them. 2) You shouldn't have left your work until the last minute. What is it you "can't" do? Like, you must have been taught in class how to do such things, maybe look back at the lecture notes? … | |
Re: [QUOTE=rotten69;1719719]hahaah.. yeah I just realised that I answered my last question in the previous post. Any security concerns about client or server side sessions?[/QUOTE] Hey, I BELIEVE that server side sessions are a lot more secure, rather than client side because they are on the persons machine. That's the way … | |
Re: I kinda like Codeignitor, I like how they've structured their platform, but I think it's over hyped. I dunno about anyone else, but I kinda like making apps from the ground upwards, or, atleast, make my own classes that I can then re-use.. I know what's going into them, and, … | |
Re: [code] #include <iostream> #include<cmath> using namespace std; int main() { for(int i=0; (i < 7); i++) { cout << "*"; } cout << "\n "; for(int i=0; (i < 5); i++) { cout << "*"; } cout << "\n "; for(int i=0; (i < 3); i++) { cout << "*"; … | |
Re: [code] <?php /*Set to error level to development modes*/ ini_set("display_errors", 1); error_reporting(E_ALL); if ( isset($_POST['username'])) { $ret = add_to_database(); if (!$ret) { print "Error: Database error"; } else { print "Welcome <b> $_POST[username] Check your email and download the books</b>"; } } else { write_form(); } //functions function write_form() { … | |
Hello I need some advice (I'm not expecting code - Just want to know if it's possible / references) Basically, I want to create a class that I can check if the email has been submitted AND also, if it's formatted right (e.g. does it contain a @ but also … | |
![]() | Re: I think you mean: [code] <?php echo 'Hello, world'; ?> [/code] [code] <?php $var = "foo"; echo $var; ?> [/code] |
Re: [QUOTE=evstevemd;1717985]to log out just unset variables you did set and destroy the session. I can see validation in JS, that is bad unless it there is of course another check in Server side.[/QUOTE] Hello I do not want to seem to contradict you but I've always been taught that validation … | |
Re: [url]http://www.tizag.com/mysqlTutorial/mysqlcount.php[/url] | |
Re: Enscription or Encryption? I'm confused! | |
Re: Noticed a few things. [code] <?php session_start(); include "config.php"; if (!isset($_SESSION['username'])) { header('location: login.php'); } echo "Welcome, " . $_SESSION['username']; $result = mysql_query("SELECT username, full_name FROM user WHERE username='$username'") or die(mysql_error()); $row=mysql_fetch_array($result); echo "Hi, " . $row['full_name']; // You haven't selected "full_name" ?> <p>Would you like to edit your <a … | |
Hello there, wonder if you can help me.. I've got to normalise a database, up to 3NF and wonder if you do the normalisation on each individual table, OR the database as a whole? I've got this so far: [I]Attributes[/I]: registration_No Make Model Type Cylinder Body Type Transmission Air Conditioning … | |
Re: Hello Sessions or cookies (specifically cookies) can work effectively for this problem. Alternatively, you could store whether they have accepted into a database, via their IP or username.. | |
Re: Hey, I think this would be a complex application to write. But, is possible.. For example: If you know the algorithm of your application, interpret this as symbols/images.. e.g. for every "if statement" display a diamond & write the conditions I'd go down that route anyway! | |
Re: [QUOTE=Tahmod;1717961]I know how arrays work. The problem is that I don't know how to put the numbers in order. Example if I input 20 number: 10, 2, 2, 3, 1, 2, 6 ,9 ,6 ,4 ,11 ,21 ,32 ,21 ,25 ,36 ,36, 35 ,25, 26 How could I get the … | |
Re: [QUOTE=filipgothic;1718225]there is code to make space betwen text, if you do like 10x space it will still be one space but one simple code read full space. bye[/QUOTE] You don't mean the "code" do you? This will allow space between text.. ![]() | |
Re: Could you please tell us what the errors are? Also, noticed a few things: 1) Your "idno" should be set as AUTO_INCREMENT inside your database. 2) You should define your variables better, or, at least define them and run some checks on them before they get entered into the database. | |
Re: I'm no expert, but I think this is what you're trying to do: - Execute a script on "domain1.com" that checks if the user is logged in - Stores the result in JSON - On "domain2.com" have a script that reads the JSON and then checks whether someone is signed … | |
Re: Hello, I dunno if this helps but noticed a few things in your code: [code] int main{ [/code] -- Does this even compile? [code] for (;t<choice;) [/code] -- What are you trying to do here? [code] results = searchList(random [i],t,temp); [/code] -- I think you're trying to store "results" from … | |
Re: Please could you post what you have so far please? Show us something we can work on, without having to guess what you're using! Also, have a look into the LINQ library which could sort the DOB easier. Hope this helps =) | |
Re: What is the problem using Googles API's? Can you post the google api code that you wrote to translate? | |
Hello, I'm developing a system that emails people like a week before a particular date.. But they don't actually have to visit the page to receive the email, is this possible? Thanks :) | |
Hello, I'm doing a project where I need to see which number matches to a list of letters in the alphabet. Currently I have the output as: [code] A= 5 A= 8 B= 9 B= 2 C= 0 C= 3 D= 6 D= 4 E= 1 E= 13 F= 0 … | |
Hello, I have a map that contains the alphabet (key) and a double (value) and I would like to sort the list so that the highest value is at the top but it still keeps it's key.. E.g. [code] #include <iostream> #include <map> int main() { map<char, double> alphabet; alphabet['a'] … | |
Hello, I'm writing a program that compares two percentages and I need them to be rounded up or down depending on their number.. I have used this: [code] percentage[i] = Math.Round ((analysis[i] * 100) / char_count); [/code] Bit it throws an error that it's too ambiguous.. Now the "analysis" is … | |
Hello, I have two arrays that contain different numbers that I need to compare with another array.. e.g. Array 1: 10 20 40 70 Array 2: 5 3 10 18 2 Basically, I want to write a program that calculates the highest value each array and then swops the values.. … | |
Hello, I'm trying to read in words from a text file that look like: The World Fell Over etc.. But it doesn't seem to be working.. I've written some code however it will only show the first word OR loads of question marks.. [code] string dictionary() { string words[500]; ifstream … | |
Hello wonder if you could help me please.. Basically I'm trying to implement a script where it searches through a file and sees the most popular word.. I've got it doing it like this: [CODE] Squence: 0 0 Squence: 1 0 Squence: 2 0 Squence: 3 0 Squence: 4 0 … | |
Hello, I need to search a char array, for a particular word... E.g. [code] char * search; char arr[10] = {'b', 'c', 'a', 't', 'h', 'e', 'p', 'h'}; string words[1] = {"the"}; search = strstr (alphabet, words); [/code] But it doesn't work... Any ideas what the problem could be? Thanks … | |
Re: I don't know what you're trying to do but shouldn't it be: [code] bool found = false; If(x==1||x==2||x==3) { found = true; }else{ cout<<"Please provide the correct input"; cin >> input; } if(found) { cout<<"Enter number"; cin>>no; } [/code] Also, put your code in tags! | |
Hello, I'm working on a project where certain characters can have multiple values.. E.g. Letter 'A' can be replaced with 'B', 'C', 'D' Letter 'S' can be replaced with 'X', 'Y' And then it would output it like this: A can be replaced with B - Yes/No A can be … | |
Hello, I'm doing some work on Frequency Analysis and decrypting text.. Basically, this is how I think it works... You take the alphabet (as a char) [code] alphabet[26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; [/code] Then you read in the string you want to analyse [code] crypt[26] = {'c', 'a', 'b', 'e', 'f', 'f', … | |
Hello (Dunno if this is the right forum) But basically, I've been given some text to decrypt. I've got to do it using frequency analysis. Here's what I've done: 1. Got a frequency analysis of the text: Showing how many times a letter appears. 2. Got a frequency analysis of … | |
Hello, I have an array and need to sort it so that the highest numbers show first etc.. I have written this: [code] for(int i=0; (i < 26); i++) { while(counter[i] < counter[i + 1]) { int temp = counter[i]; counter[i + 1] = temp; counter[i] = counter[i + 1]; … | |
Hey.. Is it possible to make PHP type arrays? Like keys? For example, I have an array of numbers, and an array of letters.. A = 10 B = 20 C = 30 And then I sort the numbers so that the highest number is at the top etc.. But, … | |
Hello I'm trying to display the memory location(s) of an array of pointers. It works, but it prints the memory locations out as: e.g. [code] (0x7fff672e19a0) [/code] I know that is the memory location, but in other examples, I've seen it being displayed as [code] 4041 [/code] Here is the … | |
Hello, I am working on a script that reads each individual character from a txt file and then outputs it depending on whether it's in the alphabet or not.. The problem is, it won't output spaces or anything apart from the string.. e.g. The text file reads: [code] Hello, my … | |
Hello, I'm developing an application that reads a text file, and then replaces what's in the text file with an array (alphabet) It all works ok until I try and change the position of the inputted character and it returns: [b]Segmentation fault: 11[/b] It's really confusing! Here is my code: … | |
Hello, I'm trying to calculate the center of a DIV element. But it doesn't seem to be working, I don't quite get what to do with the calculations.. Here's my code: [code] <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <style type="text/css"> body { background-color: #cccccc; } .rectangle { width: 400px; height: 100px; border-style:solid; … | |
Hello, I'm using jQuery and trying to create a plugin that draws a rectangle on a canvass. However, it will not even work.. I have tried to create it when I click on a button, this does not work either.. Here is the code: [code] <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> … |
The End.