linux1880
-
Posts
136 -
Joined
-
Last visited
Posts posted by linux1880
-
-
Hi friends I have a form with mysqli comnnection
<label for="fullname">Fullname</label> <input type="text" name="fullname" /> <label for="photo">Upload photo</label> <input name="photo" type="file"/>
and on the php ends I have
$fullname = $_POST['fullname']; $uploaddir = './uploads/'; //upload file in folder $uploadfile = $uploaddir. basename($_FILES['photo']['name']); //insert filename in db $upload_filename = basename($_FILES['photo']['name']); move_uploaded_file($_FILES['photo']['tmp_name'], $uploadfile); $photo = $upload_filename; $sql = "INSERT INTO members(fullname,photo) VALUES('$fullname', '$photo'); $stmt = $link->query($sql) or die($link->error); $stmt->close;
Please help me, I am using this on a live site
-
well echo $values just giving Array.
-
Thannks mikosiko,
after applying above i got the below print of var_export($variable)
array ( 'Field' => 'color', 'Type' => 'enum(\'red\',\'blue\',\'green\',\'white\')', 'Null' => 'YES', 'Key' => '', 'Default' => NULL, 'Extra' => '', )
How do i now make it a selection list of colors ? Pls help
-
I have a database field
`color` enum('red','blue','green','white') DEFAULT NULL,
and php form
<label for="color">Colors</label><br /> <input type="text" name="color" />
How do i display enum value on the php form from mysql database? Please help
php mysql
-
hi friends, what does this variable means in javascript ? pls help
var params = 'id='+id;
-
Thnaks alex, got it, but I am not very clear on original question.
-
what does empty array such as $row[] means ?
-
Hi friends how does this types of array operate ? pls help, I am repeatedly facing this code but my brain can't hold, i am familiar with multi dimensional array but what are these ?
$data[$row['id']]
$options['data']=$row[0];
-
It's fine when i goto my site browser
-
Hi friends,
while searching google , my website title appear as
"Buy Citalopram Tablets with 100% Privacy and Anonymous Delivery"how come this happens, is it because my site got hacked ?
-
<select name="hello" id="select_hello"> <option value="hello1">Hello 1</option> <option selected value="hello2">Hello 2</option> <option value="hello3">Hello 3</option> <option value="hello4">Hello 4</option> </select>
I have the following code, why is options 'hello2' not being selected when page load ? pls help
-
Thank you so much, yeah i got what i want. When looking at arrays in php.net manual it sounds so simple but while building application it's a major issue, hope i will get learn more, the more i spend time in it.
-
Thank you thorpe, that's using foreach, i want to access some fields without using loops, for example if i access
echo $document['document_name'];
directly, it's giving me error.
A PHP Error was encountered Severity: Notice Message: Undefined index: document_name Filename: libraries/Loader.php(673) : eval()'d code
-
view file var is
print_r($document);
coltroller file is
$this->page_content['document']=$this->Model->showPics();
model is
function showPics(){ $sql="select * from document"; $query=$this->db->query($sql); return $query->result_array(); }
-
well this is the views file of codeIgniter php framework.
-
Hi friends,
a quick print_r() shows the following array while connecting to my database. How to get them as individual items and display on the website ?
Array ( [0] => Array ( [id] => 52 [document_name] => xyz [document_ext] => gif [download_file_name] => ktm_impact.gif [upload_dt] => 2010-08-11 ) )
-
hello friends,
while clicking the form all the information goes to database, I have one image upload field,
when cliking the submit button, i would like 'image name' to go in database and file to go in
/upload folder, i have tried this for hours and gave up,
if anyone help me in this, i would be very greatful
-
Hi all, i am creating a custom blog for practise, how do we add no of clicks in database to that topics visitors clicks. I have added 'clicks' field in table 'blog_posts'. Now how to add and increment value by 1 when visitors visits that topic ?
-
hello friends
what does this type of array means ?
$data[] = $row;
-
the $images array was declared like this $images[]= array();
what does it mean ?
-
how would i display image without using foreach in this case ?
<?php foreach($images as $image): ?> <div class="thumb"> <img src="<?php echo $image['url']; ?>">" /> <img src="<?php echo $image['thumb_url']; ?>" /> <?php endforeach; ?>
-
Hi all,
If there are a two tables in a database with primary key are they in relationship without needing to add foreign keys ?
I was doing
select col1, col2 from table1,table 2
it just fetch two coluns from two different tables. There was no fk.
Is that possible ?
-
I have generated css sprites uploading images zip file into this site http://spritegen.website-performance. it gives me coordinates like
.sprite-accept { background-position: 0 0; width: 16px; height: 16px; } .sprite-add { background-position: 0 -66px; width: 16px; height: 16px; }
, when i apply this css on page it gives me like 4 images on the row, I did play setting background-position into different width It doesn't work, how do i exactly get the required image only ? Pls help
-
Hello guys pls give me example for horizontal css drop down menu with css but no javascript. Thanks
help me to secure my php mysql form
in PHP Coding Help
Posted
I think it's insecure and asking you guys how to secure it. And also how to make each file unique ? please help me to make this code better.