farkewie
Members-
Posts
265 -
Joined
-
Last visited
Never
About farkewie
- Birthday 12/17/1984
Contact Methods
-
MSN
tyrongower@hotmail.com
-
Website URL
http://intacode.com
Profile Information
-
Gender
Male
-
Location
Queensland Australia
farkewie's Achievements
Regular Member (3/5)
0
Reputation
-
(output started at /home/bucket/public_html/inc/config.php:7) So what does line 7 in config.php say?
-
Create error message in comparing date, room in a calendar
farkewie replied to dsp77's topic in MySQL Help
Hi, Below is untested but should give some basic logic. just want to see if there is an appointment with a start time between your new appointments start and end time. <?php $dbhost = 'localhost'; $dbuser = 'user'; $dbpass = 'password'; $dbname = 'database'; mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to mysql"); mysql_select_db($dbname); $startDate = ""; $startTime = ""; $endDate = ""; $endTime = ""; $room = ""; $query = "SELECT * FROM Table1 WHERE table='".table."' AND startDate='".$startDate."' AND startTime BETWEEN '".$startTime."' AND '".$endTime."'"; $result = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($result) > 0){ //an appointment already in that timeframe. } ?> -
Hi, A word of advice. No one will open your files and read them. I cant even see where they are attached. Post the section of code you are having trouble with inside blocks and also post the error. then state what you have tried to resolve it. Then people will jump at the chance to help.
-
To elaborate they do not have to be in the same order as the database schema and you do not need to list all fields, only ones you want to modify
-
$sum = 0; foreach($_SESSION['itemname'] as $k=>$v) { $sum += $_SESSION['itemprice'][$k]; echo "Item Name : ".$v . ': Item Price : ' . $_SESSION['itemprice'][$k] . ': QTY : ' . $_SESSION['itemqty'][$k] ."<br></br>"; } echo $sum;
-
Hi, Try this. <?php $dbhost = 'localhost'; $dbuser = 'user'; $dbpass = 'password'; $dbname = 'rss'; mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to mysql"); mysql_select_db($dbname); $header = addslashes($_POST['header']); $description= addslashes(substr($_POST['content'],0,20)."..."); $content = addslashes($_POST['content']); $query = "INSERT INTO feeds (id, title, description, content)VALUES ('','$header','$description','$content')"; $result = mysql_query($query) or die(mysql_error()); ?> addslashes is not the best option but it is a start. also you should not need to insert NULL into an id column as this should not be allowed to be null
-
Hi, Not 100% sure but it may be to do with the; if($_SESSION['item']==$_POST['h1']) { $_SESSION['qty'] = $_SESSION['qty'] + 1; } try changing it to <?php session_start(); if (isset($_POST['submit'])) { if($_SESSION['item']==$_POST['h1']) { if ($_SESSION['qty'] > 0) { $_SESSION['qty']++; } else { $_SESSION['qty'] = 1; } } else { $_SESSION['item'] = $_POST['h1']; $_SESSION['price']= $_POST['h2']; } $_SESSION['itemname'][$_SESSION['item']] = $_SESSION['item']; $_SESSION['itemqty'][$_SESSION['item']] = $_SESSION['qty']; $_SESSION['itemprice'][$_SESSION['item']] = $_SESSION['price']; } ?> All i have done is make sure it is greater than zero before adding to it if not then make it one. see how it goes
-
From "Update" to "Insert", need help with code
farkewie replied to cottonbuds2005's topic in PHP Coding Help
What errors are you getting? can you post just the code that you have tried and isn't working? -
file_get_contents getting webpage without file ext "index.htm"
farkewie replied to farkewie's topic in PHP Coding Help
I am trying to access free download managers web interface. I only want to display part of it on my page. When i say there is not ext is exactly that. You access it through "IP:PORT in the servers folder it has an index file i have tried using and browsing to IP:PORT/index.html. but page cant be displayed From what i can see FDM server reads the file in to memory and serves it as a stream. -
Just my opinion: I reckon your better off coding the page yourself instead of letting dreamweaver do it so at least then when you want something different you know what everything is doing and you can edit it to suit.
-
Hi, I want to display some of the information of a page i have that can only be accessed through a port. To view the page i would browse to http"//IP:PORT there is not file extension. How can i do this? I have tried include and file_get_contents $page = file_get_contents("Http://IP:PORT"); print $page; Here is the error i get.
-
Hi, Im really new to CSS, though i have been woking with php for a while. Basicly what i want is a main content area with all for corners curved and a border. I have created a rectangle image with the corers curved. I then split it to 3 the top, the middle which will repeat and the bottom I have tried getting it to work but the bottom just wont "stick to the bottom of the middle here are my divs <div id="mb"> <div id="mytop"></div> <div id="middle"> All my content goes here and it expands down as needed. back ground image will repeat as it expands down </div> <div id="bottom1"></div> </div> and my attempt at the css. #mb { top:150; left:400; width:700; } #mb #mytop{ background-image:url(images/New%20Folder/BodyTop.png); background-repeat:no-repeat; top:120px; left: 400px; position: absolute; width: 700px; height: 50px; } #mb #middle { background-image: url(images/New%20Folder/BodyMiddle.png); background-repeat:repeat-y; top:170px; left: 400px; position: absolute; width: 700px; height: 500px; z-index: 3; } #mb #bottom1 { background-image: url(images/New%20Folder/BodyBottom.png); background-repeat:no-repeat; background-position:bottom; position: absolute; width: 700px; z-index: 3; } is it also possible to specify a minimum size for the middle? so if there is only a little content it doesn't look weird Thanks guys
-
the same... To use the email its just $row['usrEmail ']
-
[SOLVED] Newbie - Trying to read from a second table
farkewie replied to colinsp's topic in PHP Coding Help
Hi, Looking at your dropdown box the value you are passing to the second query is from the row called "unique", so **maybe** this <?php echo "<option value=\"".$row['unique']."\">".$row['village']." - ".$row['church']."\n "; ?> should be this <?php echo "<option value=\"".$row['church']."\">".$row['village']." - ".$row['church']."\n "; ?>