
Kingy
Members-
Posts
188 -
Joined
-
Last visited
Contact Methods
-
Website URL
http://www.devhour.net
Profile Information
-
Gender
Not Telling
Kingy's Achievements

Member (2/5)
1
Reputation
-
[php] Edit single column in database returns false
Kingy replied to mikk809h's topic in PHP Coding Help
Putting ` characters around unlock should get it to work: `unlock`. Either that or change the column name to not use a reserved word. -
Well to point you in the right direction.. start looking at how php and html forms interact. Learn how PHP uses POST and GET variables. From there you can create a simple form which allows the user to fill out the form and then using the file form element you can upload files to your server. Without getting into databases you could then learn how to list directories with php and then display images in order of created/modified date to achieve what you would like.
-
I don't want to put you off and I really do encourage you to continue out learning web design/development BUT - and it's a huge but - trying to create the next ebay/craigslist will be near impossible. It would still be extremely hard if you had a lot of money to sink into it. Doing it will little to no money and hoping to 'make it big' will result in not much.
-
include file for db connection does not seem to be working
Kingy replied to alanl1's topic in PHP Coding Help
Try and hardcode the path: include('/home/user/path/to/website/ConnectDB.php'); // or C:\path\to\website\ConnectDB.php if windows Also are you getting any errors? -
As Rifts said you can use GET variables with the search form <form method="GET" action="..."> <input type="text" name="searchterm"> <input type="submit" name="submit" value="Search"> </form> and that way when the end user hits search the url will look like: yourdomain.com/?searchterm=eminem You could then easily use mod_rewrite to turn those urls into yourdomain.com/search/eminem or something similar.
-
code to display images from directory not working
Kingy replied to sid0972's topic in PHP Coding Help
Are your session variables getting set? If you hardcode a username (./uploads/user/) does it work? -
if you echo out the session variable can you see that it is getting set to spanish?
-
You should try using jQuery and making using of the .html() function. Give the text area an ID and then do: var text = "Line 1\nLine2\nLine3"; $('#textareaID').html(text);
-
I may be wrong but I think you need to pass through all input values for it to work. There are a couple of hidden inputs that I can see in the code. I usually use Developer Tools in Chrome to debug exactly what post variables/cookies are used and go from there.
-
I don't really understand what exactly you're asking. So you're wanting a new page for every single thing that is uploaded? Would it not be easier to possibly store the filename/filetype in a database and then retrieve it when the time comes? That way you would only need a couple of pages max. 1 to upload and 1 to display. Actually you might not even need a database. You could pass through the filename as a GET or POST variable and grab it that way. Take for example: http://www.examplesi...?file=image.jpg and then on the display page: <?php $filename = $_GET['file']; ?> <img src="images/<?php echo $filename; ?>" />
-
First of all I would stop using $row over and over as you will end up overwriting the previous results data. $row = "Number 1" $row = "Number 2" // Number 1 no longer exists So instead use things like $authorRow, $userRow, $galleryRow. This should solve your problem because in the last query you can use $authorRow['author_id'].
-
try and escape the $ sign to stop it being used as a variable.
-
As mentioned above DOMDocument and Xpath is the easiest way to go about it. <?php $dom = new DOMDocument(); $dom->loadHTML($content); // $content is the HTML code $xpath = new DOMXPath($dom); $value = $xpath->query("//path/to/tr/td[3]/text()")->item(0)->nodeValue; // change this path to suit ?>
-
That'll do the trick. Thanks very much
-
Have you tried it with 2 params (email, name)? In the code you pasted it shows as: $mail->AddAddress("email address to send to", "Name"); So try: $mail->AddAddress("[email protected]", "First Last"); If that works then try your $POST variables with email and fullname