43 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for jKidz

Hi Guys I wrote simple PHP script for get value from URL and check similar values from the database. This is a code <?php include('../../datab.php'); if(!empty($_GET['ip'])) { $ip = $_GET['ip']; $ipcheck = mysql_query("SELECT * FROM `report` WHERE `ip`='$ip'"); if(mysql_num_rows($ipcheck)> 0) { while($row = mysql_fetch_array($ipcheck)){ ?> <body> <p>Report ID : <?php …

Member Avatar for jKidz
0
254
Member Avatar for davidjennings

The following code is producing this error `Microsoft VBScript compilation error 800a03f6 Expected End ` followed by `/stock/availability-quick/availability2.asp, line 130` I think it is a if else error. I have looked over the code and i don't see the error and would benefit from an expert pair of eyes to …

0
159
Member Avatar for Emma_3

I need to find a digit at a specific postion in a number. Example number 652796, user inputs a 4, "2" is displayed. I have the basis for it, but most of the time, the output is incorrect. Not sure what's wrong. #include <iostream> #include <cmath> using std::cout; using std::cin; …

Member Avatar for vmanes
0
1K
Member Avatar for davidjennings

Hi all, I have to update some classic ASP code and I need to add an if statment to compare if a uppercase value is == "N/A" and to compare value with request("productLink") line 8 and if it is it should by pass validation on line 16. Any further information …

Member Avatar for JorgeM
0
379
Member Avatar for Emma_3

This program is supposed to run through the menus to eventually display the area or volume of a shape depending on the user's menu choices and input. However, it won't run the final menu and I'm not sure why. There aren't any problems when it goes through the debugger, it …

Member Avatar for AndrisP
0
217
Member Avatar for Start4me

I want to make and If statement which will work when a double "credits" is between 1 and 9. But I'm not sure how to. Will If (1 <= credits => 9) Then Work?

Member Avatar for JamesCherrill
0
310
Member Avatar for stuartlross

I am a newbie to python so exude the not so well constructed code.. I have two text files. The first one (WordFile1.txt) is " John Mary Joe alice William ….." The second (SearchText.txt) is "JOHN EGGS,24,BEEF,36,BACON,56,HAM,66 ALICE TOMATOES,16,HAM,35,BEANS,35" ……." If my response number is 2 I will get BEEF …

Member Avatar for woooee
0
281
Member Avatar for aVar++

Hello, This if statement is always returning true and I cannot see why. Could you guys tell me why? menu = input("Choose what you would like to do:\n\n1. Work out how far you will travel with a set time and speed\n2. Work out the speed you will need to travel …

Member Avatar for Gribouillis
0
246
Member Avatar for theashman88

![3a451fbd93eb17f84f06c7ac648bdcab](/attachments/small/2/3a451fbd93eb17f84f06c7ac648bdcab.PNG "align-left") I need to create this program for class. I'm not looking for the answer. I'm simply confused on how to create a batch file where I input a number and it gives me an option. Would I use the IF command if so how would I do it. …

Member Avatar for brooks.johnson.54
0
371
Member Avatar for nadiam

So as the title entails, my if else statemnt in php won't execute. i mean i would undrstand if the 'if' didn't execute but it didn't even read the else statement. so when i submit nothing happens. <?php session_start(); if(isset($_POST['jansave'])) { $basic = $_POST['basic']; $allowance = $_POST['allowance']; $bonus = $_POST['bonus']; …

Member Avatar for nadiam
0
342
Member Avatar for Ihteshamullhaq

i wantto builda GPA in C# and want to a condtion which chek the value from user input. chek it if it is greater then 70 show A GRADE greater then 50 show B GRADE like and print it and also set is this char type value to switch and …

Member Avatar for Ihteshamullhaq
0
174
Member Avatar for ourloop

The below code displays correctly, I need an "IF" statement that prevents displaying rows with 0% in the percent column and I've tried several conditions. None are working. I only want to display rows that has at least 1% in the percent column. Here is the code: $result = mysql_query("SELECT …

Member Avatar for minitauros
0
180
Member Avatar for Judgment

I'm trying to create a game of Go Fish in Python. But I've stumbled onto a little problem that I can't seem to figure out how to deal with. There is a human player (player 0) and three computer players (from 1-3). The human player goes first and chooses a …

Member Avatar for james.lu.75491856
0
680
Member Avatar for bfitzgerald

Hi Guys I'm using a form which sends data to a php file so that ti can be sent to a database. However some of the data passed are dates for the start, end of teh event and when sign ups expire. I want to stop the from data been …

Member Avatar for bfitzgerald
0
192
Member Avatar for deadsolo

Hi everyone! I am having troubles making the second IF statment execute in my code: Pattern dl_noise_rates_p = Pattern.compile("\\d+\\s(.+)\\s(.+)\\s(.+)\\s(.+)"); Matcher dl_noise_rates_m = dl_noise_rates_p.matcher(lineString2); if(dl_noise_rates_m.find()){ String s_dl_nr1 = (dl_noise_rates_m.group(1)); //checking for non numbers pulled in the regex if(s_dl_nr1 == "NaN"){ //| s_dl_nr1 == "NaN" | s_dl_nr1 == " NaN" System.out.println ("OMGOMGOMGOMGOMGOMGOMGOMGOMG …

Member Avatar for bguild
0
182
Member Avatar for Dum_Bass

I am trying to create a simple scoring function using sprite collision. I have my sprite ids defined under a seperate header and my class is in order. LEFT_SCORE is animated using a sprite sheet (obviously). int Ball::leftGoal( ) { int leftScore = 1; if (dbSpriteCollision (BALL, 12)) {++leftScore;} dbSetSpriteFrame …

Member Avatar for Dum_Bass
0
163
Member Avatar for masterfact18

!! i was trying to create a simple grading system but my project doesnt work it always shows the last if statement and ignore the other statement...please help here's my code...can someone please tell me what's wrong coz i dont know how to use if/elseif/else statement... newbie here...please help Private …

Member Avatar for tinstaafl
0
285
Member Avatar for l.worboyz

basically i am working on a project for uni, which is to create a form of an abacus model. - peg_array[] stores the number of counters/beads present in each of the pegs(lines) of the abacus. i am trying to use 2 boolean methods: "boolean removeCounter(int thisPeg)" "boolean removeCounter(int thisPeg)" thisPeg …

Member Avatar for valdez25
0
304
Member Avatar for clubberlangMayo

hi everybody, im doing a project in vb 2010 its a simple "guess the number between 1 and 30" i have it all finished working properly , my only remaining issue is, if i enter a character or letter into the combobox, it crashes the system. i got a piece …

Member Avatar for clubberlangMayo
0
271
Member Avatar for Prysm[VA]

So in my classes I've taken I was told by the teacher "case statements and if-else statements are the same things essentionally" so why learn both? and so I was not taught about cases. Besides the fact I should learn it anyway incase I need it for someone elses code, …

Member Avatar for mike_2000_17
0
322
Member Avatar for Prysm[VA]

Alright guys, I've been looking at this on google and I can't seem to find an answer. Any help is definitely appreciated! Here is the code, then I will explain my problem. void printMenu() { cout<<"||============================||"<<endl; cout<<"||=========Main Menu==========||"<<endl; cout<<"||===1.Begin DNA Creation"; cout<<"||===2.Load the Files"; if(!dna1[].strand1){ cout<<"<0>";} else{ cout<<"<"<<sizeof(dna1.strand1)<<">";} cout<<endl; cout<<"=========||"<<endl; …

Member Avatar for Prysm[VA]
0
405
Member Avatar for while(!success)

Hi guys, I'm still new to .NET and your answers to my questions have been so helpful. I have another question yet again, however. This time my question has to do with sql server and handling it with code behind. I am creating a stored procedure which is supposed to …

Member Avatar for while(!success)
0
2K
Member Avatar for lulu79

Hi, I want to get last working day data from database(SQL database). For example, if today is Tuesday, I want to get Monday data. I can get the data directly using strtTime = Date.Now.AddDays(-1).ToString("yyyy/MM/dd") & " " & "06:15:00" But the problem is if today day is Monday. Since the …

Member Avatar for lulu79
0
205
Member Avatar for coolikedat99

I am trying to make a program that generates a random number and asks the user to input the random number generated by the computer. Anyone know how to do this? This is my program: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int one; time_t …

Member Avatar for RainbowMatrix
0
291
Member Avatar for Djmann1013

I am having trouble with this code block: if($row['banned'] == 1) { header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } elseif ($row['banned'] == 2){ header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } Ive also tried this: if($row['banned'] == 1 or $row['banned']== 2) { header( 'Location: http://www.awsomechat.comuv.com/ban/userbanned.php' ); } But none of this works... I am trying …

Member Avatar for Djmann1013
0
152
Member Avatar for 111100/11000

#include <iostream> #include <cmath> #include <string> #include <cstdlib> #include <cstring> using namespace std; int main() { char chouseing_alphabet[27]={'a', 'b', 'c', '\0'}; string abc[27]; cout << "This program encrypts messages using Ceaser Cipher\n"; cout << "NOTE:capital letters are not allowed in this program\n"; cout << "\n---------------------------------------------------------"; cout << "\n---------------------------------------------------------"; cout << …

Member Avatar for Ancient Dragon
0
221
Member Avatar for da(code)da

my code is messing up. help: if (mysql_query("CREATE DATABASE $dbname",$con)) { echo "Database Created<br>"; $dbase = $_POST["CallSign"]."char"; mysql_select_db($dbase, $con); $sql = "SELECT * FROM $dbase"; $result = mysql_query($sql); if ($result) { echo "CallSign Accepted<br>"; mysql_select_db("my_db", $con); $sql="INSERT INTO users ( CallSign, Email, FirstName, MiddleName, LastName, Gender, BirthMonth, BirthDay, BirthYear, Location, …

Member Avatar for da(code)da
0
180
Member Avatar for da(code)da

Im not seeing it but its not working here is the code: mysql_select_db("my_db", $con); $sql = "CREATE TABLE stream ( waveID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(gameID), userID int, wave varchar(25), waveTime TIMESTAMP DEFAULT NOW() )"; // Execute query if(!mysql_query($sql)) { echo "Couldn't do it"; } else { echo "alright"; …

Member Avatar for da(code)da
0
169
Member Avatar for stupid guy

hi all! lame programmer here again.Please explain this thing..seems like it has truth table and stuf.anding oring etc..plz explain how this will execute.need simple explanation so i wont forget throughout my life..:D if (!(mysql_query($sql,$con)) || !(mysql_query($sql_pin,$con))) { if(mysql_errno()==1062) { $error_flag=1; echo mysql_error(); echo "error no:".mysql_errno(); die("error:".mysql_errno()); } $error_flag=1; } else …

Member Avatar for soapyillusion
0
260
Member Avatar for pwolf

the objective is as follows: Write a function splitWord(word, numOfChar) that takes in a word and a number as arguments. The function will split the word into smaller segments with each segment containing the number of letter specified in the numOfChar argument. These segments are stored and returned in a …

Member Avatar for pwolf
0
891

The End.