Linear codes with few weights have been an interesting subject of study for many years, as these codes have applications in secrete sharing, authentication codes, association schemes, and strongly regular graphs. In this paper, linear codes with few weights are constructed from inhomogeneous quadratic functions over the finite field GF(p)\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$${\mathrm {GF}}(p)$$\end{document}, where p is an odd prime. They include some earlier linear codes as special cases. The weight distributions of these linear codes are also determined.