Video Keyword (sparate with ,): <input type="text" name="metakeywords" value="" size="40" maxlength="40"/><br> So I have this but when then user puts , for seperation when the keywords are plugged into the template it looks like this funny humor comedy media No , but large gaps. What's the deal?
The script you use to process the form input must have a function to remove any commas. Post the script here if you need more help.
<?php $words = explode(",",$_POST['metakeywords'],7); $uploadDir = '../videos/'; $filename = $_FILES['image']['name']; $filearray = explode(".",$filename); $keys = array_keys($filearray); $suffix = end($keys); $uploadFile = $uploadDir . $filename; $imagedir = getcwd(); $filenamecheck = $uploadDir.$filename; $newname = $_POST['description'].".".$filearray[$suffix]; if (!file_exists($filenamecheck)) { move_uploaded_file($_FILES['image']['tmp_name'], $uploadFile); chmod ($imagedir."/".$filename, 0755); rename ($imagedir."/".$filename,$imagedir."/".$newname); $htmlfile = $_POST['nameofthehtml'] .".php"; $fp = fopen($htmlfile, "w"); $string = "<html><head><META NAME='keywords' CONTENT='".$words[0]." ".$words[1]." ".$words[2]." ".$words[3]." ".$words[4]." ".$words[5]." ".$words[6]." ".$words[7]."'> <META NAME='description' CONTENT='".$_POST['metadescription']."'> PHP:
You see this? $string = "<html><head><META NAME='keywords' CONTENT='".$words[0]." ".$words[1]." ".$words[2]." ".$words[3]." ".$words[4]." ".$words[5]." ".$words[6]." ".$words[7]."'> Could I put commmas here? ".$words[0]." ,".$words[1]." ------------^
You could do that yes. Not sure what your script is doing though - the first line $words = explode(",",$_POST['metakeywords'],7); is splitting apart the text string metakeywords at each comma do you need to do this for your script or could you just use the raw string?