708 Posted Topics
Re: If you have something specific in mind, I suggest creating your own. Don't over-complicate things with a bulky CMS if you are reaching for a simple solution. I can code a simple login system and a page editor (with the use of a wysiwyg editor) in a matter of hours. | |
Re: if you are using php5 you can use php built-in functions. [url]http://us.php.net/manual/en/function.simplexml-load-file.php[/url] | |
Re: according to your error the $phototo variable is blank. see the '../share/', there is no file name. That is your problem. Check to make sure the variable has the correct value. | |
Re: [QUOTE=chrishea;823223]I believe that the $_post should be $_POST[/QUOTE] yes. and echoing data directly from the $_POST array is a huge security risk. You need to sanitize it before you echo it to the browser. i use sessions to retain data. | |
Re: are you talking about when you output the data or when they are typing it? i am confused. | |
Re: i use list ex. [code] list( $id,$parid,$name,$color,$location,$status ) = explode(',',$string); [/code] | |
Re: actually you can upload files to the database, but its better to save them on the server. | |
Re: in your paypal form, set the input with the name of "return" to the address of your site. it needs to include the http:// | |
Re: in the move_uploaded_file() function you are moving the file to the file name itself without the upload directory prepended to it. you need to specify the directory the file needs to go to. i rewrote your code. i made i a lot more secure. its untested, please let me know … | |
Re: first of all, learn to use code tags. second, try not to post so much code. as for your internal server error, that might be caused by the use of short tags "<?" when the server isn't configured to use them. try "<?php" | |
Re: in your foreach statement use "as" instead of "in". i think in is used in javascript not php. | |
Re: to fix a problem like this I would turn to ajax. it will submit the form to php using javascript without reloading the page. it can get a little complicated, but once you get a basic understanding of it you should find it helpful. also, you could try putting a … | |
Re: an invalid resource is usually caused by a bad sql query. this doesn't mean something is wrong with the database page. the problem lies in the page that calls that function on the database page. can you post the code for product_info.php | |
Re: i am guessing you forgot a semicolon on the line above this one, but I am not sure. | |
Re: i thought mail only has 4 basic attributes. you have a lot more than that. you need to put all the variables that need to be included in the email into one variable and pass that to the function. look here for examples: [url]http://us3.php.net/manual/en/function.mail.php[/url] | |
Re: you forgot a bracket "}" at the end of the script. | |
Re: have php make the select boxes. [code] <?php $sel = '<select name="name">'; $query = mysql_query( "query to select seamstresses" ); while( $row = mysql_fetch_assoc( $query ) ) { $sel .= "<option value=\"{$row['value']}\">{$row['name']}</option>"; } $sel .= '</select>'; //echo $sel where you want the dropdown ?> [/code] | |
Re: you are getting that error because of the query failing. its putting the warning on the page before the header call which is making the header error occur. you need to fix the query and your problem will be solved. like xan said, you need to sanitize your inputs. i … | |
Re: use css. [code] #footer { position: fixed; bottom: 0; } [/code] | |
Re: you have your select name in the multiple attrib. that needs to be its own attribute [icode]<select name="contact_groups[]" multiple="multiple">[/icode] also, undefined index is a warning which can be turned off. its not an error. | |
Re: here is how i would do it [code] echo '<select onchange="javascript:window.location.href=this.value">'; for ( $i=0,$i<$pages,$i++ ) { echo "<option value=\"index.php?option={$option}&task=view&limit=". $lmt * $i . "&id={$idpik}&Itemid={$Itemid}\">{$i}</option>"; } echo '</select>'; [/code] | |
Re: [url]http://www.tizag.com/mysqlTutorial/mysqlsum.php[/url] | |
Re: to access file names in the $_FILES array you need to use 'name' not 'product_name' ex. [code] $_FILES['product_image']['name'] [/code] | |
Re: you use global inside the function [code] function blah() { global $db; //code here } [/code] or send the object as a parameter [code] function blah( &$db ) { //code here } [/code] I have no idea why you want this as a function. It doesn't need to be. | |
Re: Search for php templating engine. You should find some useful information. You can use a cron job to remove an event at a certain time. | |
Re: why don't you just use a field in the table telling whether or not its archived. just add an archive column with a 0 or 1. where 0 means not archived and 1 means it is. | |
Re: never put an image into the database itself. just upload them into a directory and put the path to file in the database. | |
Re: post your code that you changed. and we will help you. what do you mean it stops working? i don't think this is really that hard. its looping through a list of urls and using curl to post to another server. then parsing those results to get the info you … | |
Re: did you save the page with a php extension? ex. page.php | |
Re: i am not sure if this is what you are looking for: [code] if ( $variable !== '' && $variable !== 'N/A' ) { //put code here if the variable is not blank and not equal to 'n/a' } [/code] | |
Re: you could use mod_rewrite to have that url redirected to something like images.php?file=image.jpg and then you can update the database in that script using the file name in the url. | |
![]() | |
Re: don't surround the variables with a ' | |
Re: can you post your query? its a syntax error and we the need the code to fix it. | |
Re: include doesn't return the contents of a file. you would need to do a ob_start(), then include, then ob_get_contents() to get the file contents from an include. i would use file_get_contents(); ![]() | |
Re: the problem might be that the input and textarea tags do not have a name attribute. | |
Re: to fix your problem, just have all of the images upload into the same directory with a randomly generated name. then put that name into the database (which i think you have already done) with the member id. to get the images for a member, just run a query on … | |
Re: try using a different content type like text/javascript. and capitalizing the php start tag does nothing. | |
Re: you can't have the same primary key twice. hence the "duplicate entry". you are setting it as NULL. just omit the primary key entry in the values all together. like this: [code] $sql = "INSERT INTO `article_fields` (`field_title`,`field_type`) VALUES ('{$new_text}','{$field_type}')"; [/code] | |
Re: they are not adding because the url to add products is wrong. [code] <a href="Cart.php?action=add&id=1">Add To Cart</a> [/code] should be: [code] <a href="Cart.php?action=add&booksid=1">Add To Cart</a> [/code] | |
Re: i tried this: [code] $content = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'; $content .= "<entry xmlns='http://purl.org/atom/ns#'>"; $content .= "<title mode='escaped' type='text/plain'>".$title."</title>"; $content .= "<issued>".$issued."</issued>"; $content .= "<generator url='http://www.yoursitesurlhere.com'>client's name</generator>"; $content .= "<content type='application/xhtml+xml'>"; $content .= "<div xmlns='http://www.w3.org/1999/xhtml'>".$body."</div>"; $content .= "</content>"; $content .= "</entry>"; [/code] and there were no errors on my server. | |
Re: use the $_POST data to do it. not $_REQUEST, in which is not very secure. | |
Re: do you have a doctype. a lot of cross-browser issues are solved just by defining a doctype. you might also want to look into css. | |
Re: i have done this before. post your code and I will help you make the necessary changes. | |
Re: ok, i don't think this will be too hard if the text is all in the same format. the way you stated it, i think it is. is the data on seperate lines or one long string of text? if its on separate lines, you can use the file() function … | |
Re: By "didn't work" you mean? It would be a little easier to help you can explain the problem further. Also, what are you trying to do with: [code] $_SESSION['UserName'] = $UserName; $_SESSION['Password'] = $Password; [/code] at the top of every page. I was confused by that. | |
Re: Well i can help you with that. i have done this many times. if you will post the authors and the books they have, i will make a script for you that you can view on my server in a couple of hours. | |
Re: try this: [code=php] $result = mysql_query("SELECT id,title,description,data,author,mini_img,view FROM data WHERE data>'$data_begin' AND data<'$data_end'",$db) or die( 'Error: ' . mysql_error()); [/code] and tell us what is returned. you can solve many simple sql problems that way. | |
Re: try this: [code] <?php if(isset($_POST["name"]) && isset($_POST["pass"]) && isset($_POST["email"])) { $name=$_POST["name"]; $pass=$_POST["pass"]; $email=$_POST["email"]; $con=mysql_connect('localhost','root','password'); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("users", $con); $sql = "INSERT INTO `members` (username,password,email) VALUES ('" . $name . "','" . $pass . "','" . $email . "')"; $query = mysql_query($sql,$con) or … |
The End.