569 Posted Topics
Re: Hey there, Possibly. PHP doesn't (that I know of) gain access to your computer without you being on a server, it is server-side and therefore needs to be on a server. You would therefore have to specifically download something and then run the application. Most of the links that you … | |
Re: You've got more chance of finding a blonde virgin than finding a two worded domain ;-) | |
Re: Don't think I quite understand, or, if I do, why would you want to do such a thing.. Ok, have a form that asks the user if (s)he is a user or a re-seller. Then, create a database that stores this information. Everytime you want to check, you can check … | |
Re: Try including the "session.php" before "connecting.php" :) | |
Re: Hello!! I don't know if I can offer much help, or, insight to this. You should think of the logic behind Programming as being: "Anyone can code. Anyone can Google. Does that make you a Programmer? It's understanding the logic and given a task to solve and finding the best … | |
Re: > ll concerned abo @Helianthus - In my opinion, learning C++/C will open you up to learning other languages, it will give you that foundation or stepping stone and other languages syntax will become more familiar. Obviously, if you want such jobs as a C++ programming, then, you have to … | |
Re: Excuse me? What do you think this is? Lol. Don't come here asking/demanding code to be written for you, atleast make an attempt. There are services out there, in which you can PAY developers to make such things. | |
Re: Hey, please try the following: <html> <Head> <Title>Drop Down Choice Example</title> <?php //connect to database, checking, etc include_once "connect.php"; // process form when posted if(isset($_POST['value'])) { if($_POST['value'] == 'Kulp') { // query to get all Kulp records $query = "SELECT * FROM names WHERE LastName='Kulp'"; } elseif($_POST['value'] == 'Smith') { … | |
Hello, wondering if someone can help me quickly.. Basically, I have created a array to store all the data in a text file. The pointer of the array is sent to a function, which then populates it. Here is the code: void Data(char* theData) { ifstream txtFile(inputFile.c_str()); if(!txtFile.is_open()) { cerr … | |
Re: > C K F H D B G Hey, do you have an image of what the tree actually looks like? Thanks :) ![]() | |
Re: Hey, I'm guessing 1 = active, 2 = not active.. <?php mysql_select_db("my_db", $con); $result = mysql_query("SELECT * FROM gameChart WHERE secID=='1'"); echo "<dl><dt>Writer's Forge</dt>"; if(mysql_affected_rows() == 1) { echo "<dd>Collaborated Poetry</dd>"; }else{ echo "<dd><a href='showcase'>Collaborated Sreenplays</a></dd>"; } ?> Could try this.. I mean, I'm not too sure why you need … | |
Re: You forgot to mark the thread as solved, too busy talking to yourself ;) | |
Re: Just a suggestion.. The $var will be stored in temp memory, and, when you re-load the page, the $var value will therefore be cleared. Why not store it as a session? | |
Re: Hey there, nice attempt. When using classes, you should remember that your class definition should be in a (.h) file, and then class methods/functions should be in it's own seperate (.cpp) file. Let me show you an example: Sample.h: class Sample { public: Sample(); int term(int a, int b, int … | |
Re: Well, have you got a login script that handles if the user has entered the correct details? If this is the case, you can use sessions to determine whether or not the user is signed in, or not.. And then which link/data you want the user to see | |
Re: Try this: <?php //init.inc.php file session_start(); mysql_connect('mysql.host.com', 'username', 'password') or die(mysql_error()); mysql_select_db('DB name'); include('include'); // whatever your including, meh! // Get users from table function fetch_users() { $query = "SELECT user_id AS id, user_name AS username FROM profile"; $result = mysql_fetch_array($query); $users = array(); while ($row = mysql_fetch_assoc($result) !== false) … | |
Re: What? I'm confused, do you expect someone to check what domain names are free or not? :S That's a pretty extreme thing to ask for ha! http://www.fasthosts.co.uk/domain-names/ try this or who 'whois {domain_name}' in terminal/cmd | |
Re: > mysql_query("DELETE FROM gigs WHERE gigname='".$name."'"); Try: mysql_query("DELETE FROM gigs WHERE gigname='$name'"); Other than that, output $name | |
Re: <?php // connection details // connection details $sql = "SELECT * FROM {table}"; $result = mysql_query($sql) or die(mysql_error()); if(mysql_affected_rows() >= 1) { while($row = mysql_fetch_array($result)) { $image_url = $row['url']; } echo "http://localhost/htdocs/image_folder" . $image_url . ".jpg"; } ?> Have not tested it, should give you a rough idea :)! | |
Hello, I'm trying to develop an algorithm/program that calculates the distance between two points. These values are stored inside a 1D array, which, acts as a 2D array (I think you know what I mean!) The values are: 150 50 15 20 The calculation should therefore be: d = √(150 … | |
Re: Hey first off, for your own purpose, please don't post your MYSQL Account information on a public forum that anyone can see ;) Second, can you please just var_dump the $url variable where you're trying to re-direct.. So for example: > db_field <?php $host="mysql6.000webhost.com"; // Host name $username="removed"; // Mysql … | |
Re: Hey, you could try this: Hey, you could try this: <?php include 'connect/connect.php'; if(isset($_POST['sub'])) { $bcode = $_SESSION['barcode_v']; $iname = $_POST['u_name_f'].' '.$_POST['u_name_l']; $name = stripcslashes(strip_tags($iname)); $email = $_POST['email']; $dob = stripcslashes(strip_tags($_POST['y']."-".$_POST['m']."-".$_POST['d'])); $insti = stripcslashes(strip_tags($_POST['insti'])); $phone = $_POST['phone']; $course = $_POST['course']; $school = $_POST['school']; $address = $_POST['address']; $sql2 = "SELECT * … | |
Re: In order to achieved this, you, would have to use url re-write (like @Nichito pointed out) You would still have your username.php which accepts the paramater (hh). <?php $user = $_GET['username']; // Obviously with a bit more security var_dump($user); ?> Hope this helps | |
![]() | |
Re: It would be this, surely?: <?php $url = "something"; // In my php files $url contain multiple values ?> <html> <td><input type="text" size="50" value="<?php echo $url; ?>"/></td> </html> Ohhhhhhhh!! You're talking about arrays! Apologies! So you'd have a list of values: <?php $urls = array('www.google.com', 'www.yahoo.com', 'wwww.website.com'); foreach($urls as $url) … | |
Re: Does it give an error? use: or die(mysql_error()); | |
Re: Hey, Look at this: <?php $budget_min = 10; $budget_max = 10; if(!isset($budget_min) && strlen($budget_min) < 20) { // display the errror } // Check if the value entered is numeric if(!is_numeric($budget_min)) { // display the error } if($budget_min >= $budget_max) { } ?> Hope this helps :) | |
Re: Try this: #include <iostream.h> int main() { int d; int i=0,n,j,b[100]; cout<<"\n Press 1 for Decimal to Binary converstion"; cout<<"\n press 2 for Decimal to Octal converstion "; cout<<"\n press 3 for Decimal to Hexadecimal converstion"; cout<<"\n\nEnter your choice: "; cin>>d; switch(d) { case 1: cout<<"\nEnter decimal number: "; cin>>n; … | |
Re: Hey, I'll give you an example.. Then you can just relevant insert the code where you need it. int choice = 0; cout << "Please enter an option: \n"; cout << "\t\t 1) Sum Row\n"; cout << "\t\t 2) Sum Column\n"; cout << "\t\t 3) Diagonal Sum\n"; cout << "\t\t … | |
Re: Hey, As far as I'm aware, extract data from a .pdf form is impossible in PHP.. Please see: http://stackoverflow.com/questions/7419236/how-to-extract-field-value-from-pdf-form-in-php Which may offer some more help, there might be a platform that can do this.. I've never come across this though! | |
Re: mhmh, just a suggestion.. But I don't code like you: <?php $callsign = mysql_real_escape_string($_POST['CallSign']); $query = "SELECT * FROM users WHERE Callsign='$callsign'"; $result = mysql_query($query); if(mysql_affected_rows() == 1) { $row = mysql_fetch_row($result); echo $row[0] . "<br>"; }else{ echo "That CallSign has been claimed Already!<br>"; echo "<p><a href='register.php'>Return to Try Again</a><br>"; … | |
Re: From what you've said - It should be possible.. I believe, not to sure what it is your trying to do though! Anything is possible, if you put your mind to it ;) | |
Re: > e same Do you want someone to do the code for you? You could atleast attempt it. I don't get what question you're actually asking. | |
Re: Like everyone else has said, you should atleast attempt it before posting on here! Maybe this might help.. #include <iostream> #include <vector> #include <numeric> using namespace std; double subTotal(vector<double> &values) { return accumulate(values.begin(),values.end(),0); } int main(int argc, char *argv[]) { vector<double> numbers; numbers.push_back(10); numbers.push_back(20); numbers.push_back(9); numbers.push_back(8); cout << subTotal(numbers) << … | |
Re: > e text in the source code as "plain text" so it's language can be changed (english/swedish/ ....) > > An example might explain better Hey, basically, a language convertor? You can use Google's Translate API for this. https://developers.google.com/translate/ Hope this helps | |
Hello, I'm building an application in PHP and when outputting HTML tags, it shows the tags.. So for example: <?php echo "<b>Hello world</b>"; ?> I would expect Hello world to be in bold.. But no, I get: <b>Hello world</b> as the output Any ideas please? | |
Hello, I'm having a weird problem with some PHP when outputting some HTML. For example: echo "<h1>There are errors!</h1>"; foreach($errors AS $error) { echo $error . '\n'; } exit(); I want the output to actually show the text in H1 style, however the output is like this: <h1>There are errors!</h1> … | |
Re: No, it should recognise "Class 1", "Class 2".. <?php $study = $_POST['study_class']; var_dump($study); ?> Then depending on whichever value is entered, should assign this. I haven't tested it though, might be wrong! | |
Re: Confused.. By using var_dump, it just dumps whatever is stored in a particular varialbe and then outputs it to the screen (or whatever)! In order to display the output, you should just use echo/printf? <form action="abc.php" method="post"> <select name="study_class[]" multiple> <option value="Class 1">CLASS 1</option> <option value="Class 2">CLASS 2</option> <option value="Class … | |
Re: Hello, Have you tried to use jQuery? It has an amazing library for key events. I haven't come across such a thing in PHP before. | |
Re: Hello, It would be a good idea if you atleast tried this yourself, even the smallest attempt would be beneficial since we're not here to do homework. I don't clearly understand what you want, but, have a look at this: <?php // Accept the users age $age = $_POST['age']; $half_age … | |
Re: No. You cannot. You can however, "design" the drop down menu in HTML and then process it using PHP. | |
Re: Hello, First of all, I wouldn't put the function there. Make sure that the function is above all of the main code, so like this: <?php function echoArray($theArray) { $size=count($theArray); for ($i=0; $i<=$size; $i++) echo "month number " . $i . " is :" .$theArray[$i] . "<br />"; } // … | |
Re: Try this: <?php // Set up the database connection $dsn = 'mysql:host=localhost;dbname=lafamosa_plaincart'; $username = 'lafamosa_kermis'; $password = 'lafamosa1980'; $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); try { $db = new PDO($dsn, $username, $password, $options); } catch (PDOException $e) { $error_message = $e->getMessage(); include('errors/db_error_connect.php'); exit(); } ?> | |
Re: Maybe show some code where it's going wrong - People might be able to help you :) | |
Re: > here, I don't know how to get PHP to build a list using the data. I could do it manually every time a new month comes up, but that defeats the purpose in my book. Hello, Basically (From what I understand) you should have a table/column that populates a … | |
Re: Hello, First of all.. int main(); Shouldn't have a semicolon, therefore it should just be: int main() { return 0; } You've also declared a function, but, it doesnn't mean it's wrong, you can set the prototype (Especially if your using the function in main, but it's actual functiuanlity is … | |
![]() | Re: > <?php > $product_name = "pencils"; > $product_price= 7.99; > printf( "Product %f will cost %1.1f dollars.", > $product_name, $product_price ); > ?> Can't you just echo it? <?php $product_name = (string) "pencils"; $product_price= 7.99; echo "Product $product_name will cost $product_price"; ?> |
Re: > 2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; Hey, Think something like this is what you mean.. Obviously, change it slightly! #include <iostream> using namespace std; int main(int argc, char *argv[]) { int numArray[10] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; int arrayNum[10]; … | |
Re: I had to do this as a first year project.. Can you atleast show that you have attempted it, so then people can help? |
The End.